lib/ntdb fix compilation when libreplace is not around
authorChristian Ambach <ambi@samba.org>
Fri, 22 Nov 2013 04:15:59 +0000 (05:15 +0100)
committerChristian Ambach <ambi@samba.org>
Sat, 7 Dec 2013 15:45:15 +0000 (16:45 +0100)
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Rusty Russell <rusty@samba.org>
lib/ntdb/ntdb.c
lib/ntdb/ntdb.h

index 5d56b33b5a123a5da087741b5e1cc03e5de6a511..51fbbcae64d3065d322cba0f12b021cc1645bd47 100644 (file)
@@ -17,7 +17,6 @@
 */
 #include "private.h"
 #ifndef HAVE_LIBREPLACE
-#include <ccan/asprintf/asprintf.h>
 #include <stdarg.h>
 #endif
 
index df3a9ddc4eaee3a6e6f05d81247f6af8bdddbd70..a3a627f28d8f9dee48c8798cceb115a02f6bbbe6 100644 (file)
@@ -31,10 +31,20 @@ extern "C" {
 
 #ifdef HAVE_LIBREPLACE
 #include <replace.h>
+#include <system/filesys.h>
 #else
 #if HAVE_FILE_OFFSET_BITS
 #define _FILE_OFFSET_BITS 64
 #endif
+
+#ifndef _PUBLIC_
+#ifdef HAVE_VISIBILITY_ATTR
+#define _PUBLIC_ __attribute__((visibility("default")))
+#else
+#define _PUBLIC_
+#endif
+#endif
+
 /* For mode_t */
 #include <sys/types.h>
 /* For O_* flags. */