socket_wrapper: use libreplace headers based on "#ifdef HAVE_LIBREPLACE"
authorMichael Adam <obnox@samba.org>
Sun, 20 Nov 2011 22:45:05 +0000 (23:45 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 25 Nov 2011 12:24:34 +0000 (13:24 +0100)
instead of "#ifdef _SAMBA_BUILD_".

This is to be able to use socket_wrapper in other projects
that also use libreplace.

lib/socket_wrapper/socket_wrapper.c

index 7ebbfb3b75ba763e46d030852cf38fc9e769d70d..2c24ab79241111ac0baa52452003624fbf43af97 100644 (file)
@@ -39,7 +39,9 @@
    is set.
 */
 
-#ifdef _SAMBA_BUILD_
+#include "config.h"
+
+#ifdef HAVE_LIBREPLACE
 
 #define SOCKET_WRAPPER_NOT_REPLACE
 #include "replace.h"
@@ -47,7 +49,7 @@
 #include "system/filesys.h"
 #include "system/time.h"
 
-#else /* _SAMBA_BUILD_ */
+#else /* HAVE_LIBREPLACE */
 
 #include <sys/types.h>
 #include <sys/time.h>
@@ -66,7 +68,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
-#endif
+#endif /* HAVE_LIBREPLACE */
 
 #ifndef _PUBLIC_
 #define _PUBLIC_