diff options
-rw-r--r-- | lib/util/charset_compat.h | 9 | ||||
-rw-r--r-- | lib/util/samba_util.h | 5 | ||||
-rw-r--r-- | lib/util/substitute.c | 4 | ||||
-rwxr-xr-x | lib/util/wscript_build | 2 |
4 files changed, 20 insertions, 0 deletions
diff --git a/lib/util/charset_compat.h b/lib/util/charset_compat.h new file mode 100644 index 0000000000..cb3b6252a3 --- /dev/null +++ b/lib/util/charset_compat.h @@ -0,0 +1,9 @@ +#ifndef _SAMBA_CHARSET_COMPAT_H_ +#define _SAMBA_CHARSET_COMPAT_H_ + +#include <string.h> + +#define strchr_m(h, n) strchr(h, n) +#define strstr_m(h, n) strstr(h, n) + +#endif /* _SAMBA_CHARSET_COMPAT_H_ */ diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h index 2578af80f6..41b3fc8ecd 100644 --- a/lib/util/samba_util.h +++ b/lib/util/samba_util.h @@ -21,7 +21,12 @@ #ifndef _SAMBA_UTIL_H_ #define _SAMBA_UTIL_H_ +#ifndef SAMBA_UTIL_CORE_ONLY #include "lib/util/charset/charset.h" +#else +#include "charset_compat.h" +#endif + #include "lib/util/attr.h" /* for TALLOC_CTX */ diff --git a/lib/util/substitute.c b/lib/util/substitute.c index 70cc441a32..49adeaf178 100644 --- a/lib/util/substitute.c +++ b/lib/util/substitute.c @@ -23,7 +23,11 @@ #include "replace.h" #include "debug.h" +#ifndef SAMBA_UTIL_CORE_ONLY #include "charset/charset.h" +#else +#include "charset_compat.h" +#endif #include "substitute.h" /** diff --git a/lib/util/wscript_build b/lib/util/wscript_build index d3865d8c03..cd23231f3c 100755 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -41,6 +41,8 @@ bld.SAMBA_SUBSYSTEM('samba-util-core', if not bld.env.SAMBA_UTIL_CORE_ONLY: + bld.env.public_headers_skip.append('charset_compat.h') + bld.SAMBA_LIBRARY('samba-util', source='''talloc_stack.c smb_threads.c rbtree.c rfc1738.c become_daemon.c system.c select.c getpass.c |