s4 heimdal_build: Fix static heimdal builds with replacement closefrom()
[samba.git] / source4 / heimdal_build / wscript_build
index bedc130e07ae5cd2859dd078da2a3362f1b3cb6c..163b622fca946863699fe40b674ac61a53a2af32 100644 (file)
@@ -376,7 +376,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
             target = '../heimdal/lib/roken/err.h',
             )
 
-    ROKEN_HOSTCC_SOURCE = '''
+    ROKEN_COMMON_SOURCE = '''
         lib/roken/base64.c
         lib/roken/ct.c
         lib/roken/hex.c
@@ -411,11 +411,13 @@ if not bld.CONFIG_SET('USING_SYSTEM_ROKEN'):
     '''
 
     if not bld.CONFIG_SET('HAVE_CLOSEFROM'):
-        ROKEN_HOSTCC_SOURCE += '''
-            lib/roken/closefrom.c
+        ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE + '''
+            ../../lib/replace/closefrom.c
         '''
+    else:
+        ROKEN_HOSTCC_SOURCE = ROKEN_COMMON_SOURCE
 
-    ROKEN_SOURCE = ROKEN_HOSTCC_SOURCE + '''
+    ROKEN_SOURCE = ROKEN_COMMON_SOURCE + '''
         lib/roken/resolve.c
         lib/roken/socket.c
         lib/roken/roken_gethostby.c