From: Stefan Metzmacher Date: Thu, 8 May 2008 08:39:41 +0000 (+0200) Subject: libreplace: make sure system/network.h is only used when AC_LIBREPLACE_NETWORK_CHECKS... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b26742234467ac1dcfda059e81a35a1cd5e96ed;p=thirdparty%2Fsamba.git libreplace: make sure system/network.h is only used when AC_LIBREPLACE_NETWORK_CHECKS was used metze (cherry picked from commit 3fddd36e119f73a5021370450f9687ef9d252bab) --- diff --git a/source/lib/replace/libreplace_network.m4 b/source/lib/replace/libreplace_network.m4 index f1657d9f796..56c603a1552 100644 --- a/source/lib/replace/libreplace_network.m4 +++ b/source/lib/replace/libreplace_network.m4 @@ -2,6 +2,7 @@ AC_DEFUN_ONCE(AC_LIBREPLACE_NETWORK_CHECKS, [ echo "LIBREPLACE_NETWORK_CHECKS: START" +AC_DEFINE(LIBREPLACE_NETWORK_CHECKS, 1, [LIBREPLACE_NETWORK_CHECKS were used]) LIBREPLACE_NETWORK_OBJS="" LIBREPLACE_NETWORK_LIBS="" diff --git a/source/lib/replace/system/network.h b/source/lib/replace/system/network.h index a5fb813aa15..077892a54e2 100644 --- a/source/lib/replace/system/network.h +++ b/source/lib/replace/system/network.h @@ -27,6 +27,10 @@ */ +#ifndef LIBREPLACE_NETWORK_CHECKS +#error "AC_LIBREPLACE_NETWORK_CHECKS missing in configure" +#endif + #ifdef HAVE_SYS_SOCKET_H #include #endif