WIP integrate with libosmocore in as far as msgb_alloc() works
Change-Id: I99617d217ab938ab57746445906b1af8902b5ff7
diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index c2a959b..3c189eb 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -709,6 +709,7 @@
extern void testmode_init(void);
#include "talloc.h"
+#include <osmocom/core/msgb.h>
void *g_tall_ctx;
DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report")
@@ -720,6 +721,7 @@
{
for (int i = 0; i < 10; i++)
talloc_named_const(g_tall_ctx, 10, "sibling");
+ msgb_alloc_c(g_tall_ctx, 1024, "foo");
}
DEFUN(v_talloc_free, cmd_talloc_free, "talloc-free", "Release all memory")
@@ -728,6 +730,15 @@
g_tall_ctx = NULL;
}
+/* dependency of libosmocore. FIXME: Implement it bsed on jiffies and/or RTC! */
+#include <sys/time.h>
+int _gettimeofday(struct timeval *tv, void *tz)
+{
+ tv->tv_sec = 0;
+ tv->tv_usec = 0;
+ return 0;
+}
+
/* Section 9.6 of SAMD5x/E5x Family Data Sheet */
static int get_chip_unique_serial(uint8_t *out, size_t len)
{