]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dcesrv_core: fix build
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 27 Mar 2021 16:17:34 +0000 (17:17 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 7 Apr 2021 09:18:30 +0000 (09:18 +0000)
Move include of system/network.h to avoid a build error:

In file included from ../../lib/replace/system/network.h:35,
                 from ../../librpc/rpc/dcesrv_core.c:2658:
usr/include/unistd.h: At top level:
usr/include/unistd.h:675:16: error: conflicting types for ‘geteuid’
  675 | extern __uid_t geteuid (void) __THROW;

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
librpc/rpc/dcesrv_core.c

index 8db1774270188620868dfcd1510cec8eb96a1915..b75336d0a8540ff5230451a210375075e4445350 100644 (file)
@@ -33,6 +33,7 @@
 #include "lib/tsocket/tsocket.h"
 #include "librpc/gen_ndr/ndr_dcerpc.h"
 #include "lib/util/tevent_ntstatus.h"
+#include "system/network.h"
 
 
 #undef DBGC_CLASS
@@ -2634,16 +2635,6 @@ _PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
        }
 }
 
-/* We need this include to be able to compile on some plateforms
- * (ie. freebsd 7.2) as it seems that <sys/uio.h> is not included
- * correctly.
- * It has to be that deep because otherwise we have a conflict on
- * const struct dcesrv_interface declaration.
- * This is mostly due to socket_wrapper defining #define bind swrap_bind
- * which conflict with the bind used before.
- */
-#include "system/network.h"
-
 struct dcesrv_sock_reply_state {
        struct dcesrv_connection *dce_conn;
        struct dcesrv_call_state *call;