summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/includes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/ldb/include/includes.h b/source4/lib/ldb/include/includes.h
index 1d3ac2a50e..44ff672266 100644
--- a/source4/lib/ldb/include/includes.h
+++ b/source4/lib/ldb/include/includes.h
@@ -28,3 +28,11 @@
#include "tdb.h"
#include "proto.h"
+#ifdef HAVE_INTPTR_T
+#define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+#else
+#define discard_const(ptr) ((void *)(ptr))
+#endif
+#define discard_const_p(type, ptr) ((type *)discard_const(ptr))
+
+