lib/replace: move lib/replace/closefrom.c from ROKEN_HOSTCC_SOURCE to REPLACE_HOSTCC_...
authorStefan Metzmacher <metze@samba.org>
Tue, 8 Sep 2020 10:13:20 +0000 (10:13 +0000)
committerStefan Metzmacher <metze@samba.org>
Tue, 8 Sep 2020 13:59:58 +0000 (13:59 +0000)
This is where it really belongs and we avoid the strange interaction
with source4/heimdal_build/config.h. This a follow up for commit
f31333d40e6fa38daa32a3ebb32d5a317c06fc62.

This fixes a build problem if libbsd-dev is not installed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14482

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep  8 13:59:58 UTC 2020 on sn-devel-184

lib/replace/wscript
source4/heimdal_build/wscript_build

index 254611537495f0f5301de2e18d239e538fa86dad..85bc11d2f01117cbe02405c448740f10bf4b1289 100644 (file)
@@ -874,6 +874,9 @@ def build(bld):
     if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
     if bld.CONFIG_SET('REPLACE_REQUIRES_LIBSOCKET_LIBNSL'): extra_libs += ' socket nsl'
 
+    if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
+        REPLACE_HOSTCC_SOURCE += ' closefrom.c'
+
     bld.SAMBA_SUBSYSTEM('LIBREPLACE_HOSTCC',
         REPLACE_HOSTCC_SOURCE,
         use_hostcc=True,
index f7ff33160ca690e74e8b35669ca19025ebed9a4c..09c525c29574f648efebcb84a2bea6b9ac47ec5a 100644 (file)
@@ -391,12 +391,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
         ../heimdal_build/replace.c
     '''
 
-    if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
-        ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE + '''
-            ../../lib/replace/closefrom.c
-        '''
-    else:
-        ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE
+    ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE
 
     ROKEN_SOURCE = ROKEN_COMMON_SOURCE + '''
         lib/roken/resolve.c