From a60e59a4730d6a11f999085aa8754fd0de5dfbaf Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 19 Dec 2011 13:18:03 +1000 Subject: test: fix linker error 'input_option_new' undefined We need a copy of it in the driver. This is just the one the driver uses for pre-ABI 14 compatibility, we don't need the server's exact copy since we're not testing that API (that's the server's job), only our use of the API. Signed-off-by: Peter Hutterer Reviewed-by: Chris Bagwell Reviewed-by: Jason Gerecke --- test/fake-symbols.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/test/fake-symbols.c b/test/fake-symbols.c index e25dd34..9607bf3 100644 --- a/test/fake-symbols.c +++ b/test/fake-symbols.c @@ -461,3 +461,38 @@ void xf86UnblockSIGIO (int wasset) { } + +/* This is not the same as the X server one, but it'll do for the tests */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 +typedef struct _InputOption { + struct _InputOption *next; + char *key; + char *value; +} InputOption; + +InputOption* +input_option_new(InputOption *list, const char *key, const char *value) +{ + InputOption *new; + + new = calloc(1, sizeof(InputOption)); + new->key = strdup(key); + new->value = strdup(value); + new->next = list; + return new; +} + +void +input_option_free_list(InputOption **opts) +{ + InputOption *tmp = *opts; + while(*opts) + { + tmp = (*opts)->next; + free((*opts)->key); + free((*opts)->value); + free((*opts)); + *opts = tmp; + } +} +#endif -- cgit v1.2.1