xref: /OK3568_Linux_fs/buildroot/package/samba4/0004-dcesrv_core-fix-build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom 44bccdf7d158ae93ba9a5515038aac2a5ac4fd85 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Bernd Kuhls <bernd.kuhls@t-online.de>
3*4882a593SmuzhiyunDate: Sat, 27 Mar 2021 17:17:34 +0100
4*4882a593SmuzhiyunSubject: [PATCH] dcesrv_core: fix build
5*4882a593SmuzhiyunMIME-Version: 1.0
6*4882a593SmuzhiyunContent-Type: text/plain; charset=UTF-8
7*4882a593SmuzhiyunContent-Transfer-Encoding: 8bit
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunMove include of system/network.h to avoid a build error:
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunIn file included from ../../lib/replace/system/network.h:35,
12*4882a593Smuzhiyun                 from ../../librpc/rpc/dcesrv_core.c:2658:
13*4882a593Smuzhiyunusr/include/unistd.h: At top level:
14*4882a593Smuzhiyunusr/include/unistd.h:675:16: error: conflicting types for ‘geteuid’
15*4882a593Smuzhiyun  675 | extern __uid_t geteuid (void) __THROW;
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunPatch sent upstream:
18*4882a593Smuzhiyunhttps://gitlab.com/samba-team/samba/-/merge_requests/1871
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunSigned-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
21*4882a593Smuzhiyun---
22*4882a593Smuzhiyun librpc/rpc/dcesrv_core.c | 11 +----------
23*4882a593Smuzhiyun 1 file changed, 1 insertion(+), 10 deletions(-)
24*4882a593Smuzhiyun
25*4882a593Smuzhiyundiff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c
26*4882a593Smuzhiyunindex 70e0245532e..e761329d157 100644
27*4882a593Smuzhiyun--- a/librpc/rpc/dcesrv_core.c
28*4882a593Smuzhiyun+++ b/librpc/rpc/dcesrv_core.c
29*4882a593Smuzhiyun@@ -32,6 +32,7 @@
30*4882a593Smuzhiyun #include "lib/tsocket/tsocket.h"
31*4882a593Smuzhiyun #include "librpc/gen_ndr/ndr_dcerpc.h"
32*4882a593Smuzhiyun #include "lib/util/tevent_ntstatus.h"
33*4882a593Smuzhiyun+#include "system/network.h"
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun #undef DBGC_CLASS
37*4882a593Smuzhiyun@@ -2633,16 +2634,6 @@ _PUBLIC_ void dcesrv_cleanup_broken_connections(struct dcesrv_context *dce_ctx)
38*4882a593Smuzhiyun 	}
39*4882a593Smuzhiyun }
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun-/* We need this include to be able to compile on some plateforms
42*4882a593Smuzhiyun- * (ie. freebsd 7.2) as it seems that <sys/uio.h> is not included
43*4882a593Smuzhiyun- * correctly.
44*4882a593Smuzhiyun- * It has to be that deep because otherwise we have a conflict on
45*4882a593Smuzhiyun- * const struct dcesrv_interface declaration.
46*4882a593Smuzhiyun- * This is mostly due to socket_wrapper defining #define bind swrap_bind
47*4882a593Smuzhiyun- * which conflict with the bind used before.
48*4882a593Smuzhiyun- */
49*4882a593Smuzhiyun-#include "system/network.h"
50*4882a593Smuzhiyun-
51*4882a593Smuzhiyun struct dcesrv_sock_reply_state {
52*4882a593Smuzhiyun 	struct dcesrv_connection *dce_conn;
53*4882a593Smuzhiyun 	struct dcesrv_call_state *call;
54*4882a593Smuzhiyun--
55*4882a593Smuzhiyun2.29.2
56*4882a593Smuzhiyun
57