diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-19 13:18:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-20 11:15:37 +1000 |
commit | a60e59a4730d6a11f999085aa8754fd0de5dfbaf (patch) | |
tree | 3a94009a6fcec095f2dfacda60f2bae27bb673a3 | |
parent | d54d936146fa58fb10a1b6839e1413671f96f86e (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
-rw-r--r-- | test/fake-symbols.c | 35 |
1 files changed, 35 insertions, 0 deletions
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 |