From: Alan T. DeKok Date: Fri, 16 Jun 2017 12:43:59 +0000 (-0400) Subject: more linker hacks to get it to build X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0579e2497852fb4358724bd49508d94b60b97bf2;p=thirdparty%2Ffreeradius-server.git more linker hacks to get it to build --- diff --git a/src/tests/util/channel_test.c b/src/tests/util/channel_test.c index 4ae8d82b4e9..2381278a176 100644 --- a/src/tests/util/channel_test.c +++ b/src/tests/util/channel_test.c @@ -52,6 +52,31 @@ static int max_control_plane = 0; static int max_outstanding = 1; static bool touch_memory = false; +/**********************************************************************/ +typedef struct rad_request REQUEST; +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx); +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request); +void talloc_const_free(void const *ptr); + +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx) +{ + return NULL; +} + +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request) +{ +} + +void talloc_const_free(void const *ptr) +{ + void *tmp; + if (!ptr) return; + + memcpy(&tmp, &ptr, sizeof(tmp)); + talloc_free(tmp); +} +/**********************************************************************/ + static void NEVER_RETURNS usage(void) { fprintf(stderr, "usage: channel_test [OPTS]\n"); diff --git a/src/tests/util/control_test.c b/src/tests/util/control_test.c index 6dc4b54bcf5..632dc7e6253 100644 --- a/src/tests/util/control_test.c +++ b/src/tests/util/control_test.c @@ -49,6 +49,31 @@ static int aq_size = 16; static fr_control_t *control = NULL; static fr_ring_buffer_t *rb = NULL; +/**********************************************************************/ +typedef struct rad_request REQUEST; +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx); +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request); +void talloc_const_free(void const *ptr); + +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx) +{ + return NULL; +} + +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request) +{ +} + +void talloc_const_free(void const *ptr) +{ + void *tmp; + if (!ptr) return; + + memcpy(&tmp, &ptr, sizeof(tmp)); + talloc_free(tmp); +} +/**********************************************************************/ + static void NEVER_RETURNS usage(void) { fprintf(stderr, "usage: control_test [OPTS]\n"); diff --git a/src/tests/util/worker_test.c b/src/tests/util/worker_test.c index e7910df278d..f51d2b98a99 100644 --- a/src/tests/util/worker_test.c +++ b/src/tests/util/worker_test.c @@ -63,6 +63,31 @@ static int num_workers = 1; static bool quiet = false; static fr_schedule_worker_t workers[MAX_WORKERS]; +/**********************************************************************/ +typedef struct rad_request REQUEST; +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx); +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request); +void talloc_const_free(void const *ptr); + +REQUEST *request_alloc(UNUSED TALLOC_CTX *ctx) +{ + return NULL; +} + +void verify_request(UNUSED char const *file, UNUSED int line, UNUSED REQUEST *request) +{ +} + +void talloc_const_free(void const *ptr) +{ + void *tmp; + if (!ptr) return; + + memcpy(&tmp, &ptr, sizeof(tmp)); + talloc_free(tmp); +} +/**********************************************************************/ + static void NEVER_RETURNS usage(void) { fprintf(stderr, "usage: worker_test [OPTS]\n");