summaryrefslogtreecommitdiff
path: root/lib/libxkbfile/src/XKBfileInt.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libxkbfile/src/XKBfileInt.h')
-rw-r--r--lib/libxkbfile/src/XKBfileInt.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libxkbfile/src/XKBfileInt.h b/lib/libxkbfile/src/XKBfileInt.h
index 7eb81a0c0..a99b7c821 100644
--- a/lib/libxkbfile/src/XKBfileInt.h
+++ b/lib/libxkbfile/src/XKBfileInt.h
@@ -30,6 +30,7 @@
/* $XFree86$ */
#include "XKBfile.h"
+#include <string.h>
#ifdef DEBUG
#define _XkbLibError(c,l,d) \
@@ -64,9 +65,11 @@
_XFUNCPROTOBEGIN
-extern char * _XkbDupString(
- char * /* old_str */
-);
+static inline
+char *_XkbDupString(const char *s)
+{
+ return s ? strdup(s) : NULL;
+}
#define _XkbStrCaseEqual(s1,s2) (_XkbStrCaseCmp(s1,s2)==0)