From: Bernd Kuhls Date: Sat, 27 Mar 2021 16:17:34 +0000 (+0100) Subject: dcesrv_core: fix build X-Git-Tag: tevent-0.11.0~1297 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4d5fb7d279ef899307a560da2bed037cda609f10;p=thirdparty%2Fsamba.git dcesrv_core: fix build 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 Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c index 8db17742701..b75336d0a85 100644 --- a/librpc/rpc/dcesrv_core.c +++ b/librpc/rpc/dcesrv_core.c @@ -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 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;