s3-waf: finally make SO_PEERCRED configure check work with stricter CFLAGS.
[ira/wip.git] / source3 / wscript
index 1b7f0e7745a951ab42a6c873527fc41752d41cde..1f4e7c37cfb058975c5f1fac1c4bd00886cd0881 100644 (file)
@@ -442,13 +442,12 @@ return acl_get_perm_np(permset_d, perm);
     conf.CHECK_DECLS('readahead', headers='fcntl.h', always=True)
 
     conf.CHECK_CODE('''
-               #include <sys/types.h>
-               #include <sys/socket.h>
                struct ucred cred;
                socklen_t cred_len;
                int ret = getsockopt(0, SOL_SOCKET, SO_PEERCRED, &cred, &cred_len);''',
                'HAVE_PEERCRED',
-               msg="Checking whether we can use SO_PEERCRED to get socket credentials")
+               msg="Checking whether we can use SO_PEERCRED to get socket credentials",
+               headers='sys/types.h sys/socket.h')
 
     conf.CHECK_CODE('''
                #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))