From 73710c7da2f8deaea83dbbbfce8737c9c6cd2949 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Mon, 4 Jun 2018 22:27:49 +0200 Subject: VPP API: Memory trace if you plan to put a hash into shared memory, the key sum and key equal functions MUST be set to constants such as KEY_FUNC_STRING, KEY_FUNC_MEM, etc. -lvppinfra is PIC, which means that the process which set up the hash won't have the same idea where the key sum and key compare functions live in other processes. Change-Id: Ib3b5963a0d2fb467b91e1f16274df66ac74009e9 Signed-off-by: Ole Troan Signed-off-by: Dave Barach Signed-off-by: Ole Troan --- src/vppinfra/test_macros.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/vppinfra/test_macros.c') diff --git a/src/vppinfra/test_macros.c b/src/vppinfra/test_macros.c index de8f2c49fc1..05299b38e3f 100644 --- a/src/vppinfra/test_macros.c +++ b/src/vppinfra/test_macros.c @@ -26,13 +26,14 @@ test_macros_main (unformat_input_t * input) clib_macro_init (mm); fformat (stdout, "hostname: %s\n", - clib_macro_eval_dollar (mm, "hostname", 1 /* complain */ )); + clib_macro_eval_dollar (mm, (i8 *) "hostname", 1 /* complain */ )); clib_macro_set_value (mm, "foo", "this is foo which contains $(bar)"); clib_macro_set_value (mm, "bar", "bar"); fformat (stdout, "evaluate: %s\n", - clib_macro_eval (mm, "returns '$(foo)'", 1 /* complain */ )); + clib_macro_eval (mm, (i8 *) "returns '$(foo)'", + 1 /* complain */ )); clib_macro_free (mm); -- cgit 1.2.3-korg