summaryrefslogtreecommitdiff
path: root/lib/replace
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/hdr_replace.h2
-rw-r--r--lib/replace/wscript12
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/replace/hdr_replace.h b/lib/replace/hdr_replace.h
new file mode 100644
index 0000000000..6cfa50f809
--- /dev/null
+++ b/lib/replace/hdr_replace.h
@@ -0,0 +1,2 @@
+/* this is a replacement header for a missing system header */
+#include "replace.h"
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e457c5f845..8424319a1a 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -318,3 +318,15 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('LIBREPLACE_GETPASS', 'getpass.c',
enabled=bld.CONFIG_SET('REPLACE_GETPASS'))
+
+ # build replacements for stdint.h and stdbool.h if needed
+ bld.SAMBA_GENERATOR('replace_stdint_h',
+ rule='cp ${SRC} ${TGT}',
+ source='hdr_replace.h',
+ target='stdint.h',
+ enabled = not bld.CONFIG_SET('HAVE_STDINT_H'))
+ bld.SAMBA_GENERATOR('replace_stdbool_h',
+ rule='cp ${SRC} ${TGT}',
+ source='hdr_replace.h',
+ target='stdbool.h',
+ enabled = not bld.CONFIG_SET('HAVE_STDBOOL_H'))