diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-12-12 11:35:37 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-03-21 11:12:28 +1000 |
commit | fd4aacb1341dae98bac53716423e209c4782c1ad (patch) | |
tree | 743de520638c05ee8b16bf7576d046a8ca128fd0 | |
parent | 0a9c26d1a3ee92932f0d611652b39ebbd4a65c75 (diff) |
test: fix build errors introduced by upstream server change
Introduced by upstream change xorg-server-1.11.99.1-33-g09e4b78,
Fix gcc -Wwrite-strings warnings in xf86 ddx
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 9f9b55ab55ed5251c1607c59d8817231d076d82c)
-rw-r--r-- | test/fake-symbols.c | 4 | ||||
-rw-r--r-- | test/fake-symbols.h | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/test/fake-symbols.c b/test/fake-symbols.c index a312aa0..2d94622 100644 --- a/test/fake-symbols.c +++ b/test/fake-symbols.c @@ -44,7 +44,7 @@ xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val) } _X_EXPORT char * -xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt) +xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt) { return NULL; } @@ -60,7 +60,7 @@ xf86AddNewOption(OPTTYPE head, const char *name, const char *val) { return NULL; } -_X_EXPORT char * +_X_EXPORT CONST char * xf86FindOptionValue(OPTTYPE options, const char *name) { return NULL; diff --git a/test/fake-symbols.h b/test/fake-symbols.h index 7c74f7a..a297d28 100644 --- a/test/fake-symbols.h +++ b/test/fake-symbols.h @@ -3,8 +3,10 @@ #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 #define OPTTYPE XF86OptionPtr +#define CONST const #else #define OPTTYPE pointer +#define CONST #endif extern int xf86ReadSerial (int fd, void *buf, int count); @@ -17,15 +19,16 @@ extern int xf86SetSerialSpeed (int fd, int speed); extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val); extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); extern char* xf86OptionName(OPTTYPE opt); -extern char* xf86FindOptionValue(OPTTYPE options, const char *name); +extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name); extern int xf86NameCmp(const char *s1, const char *s2); extern char* xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt); -extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt); +extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt); +extern _X_EXPORT char *xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt); extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt); extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val); -extern char* xf86FindOptionValue(OPTTYPE options, const char *name); +extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name); extern char* xf86OptionName(OPTTYPE opt); extern char *xf86OptionValue(OPTTYPE opt); extern int xf86NameCmp(const char *s1, const char *s2); |