hc
2024-03-22 619f0f87159c5dbd2755b1b0a0eb35784be84e7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From 44bccdf7d158ae93ba9a5515038aac2a5ac4fd85 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sat, 27 Mar 2021 17:17:34 +0100
Subject: [PATCH] dcesrv_core: fix build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
 
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;
 
Patch sent upstream:
https://gitlab.com/samba-team/samba/-/merge_requests/1871
 
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 librpc/rpc/dcesrv_core.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
 
diff --git a/librpc/rpc/dcesrv_core.c b/librpc/rpc/dcesrv_core.c
index 70e0245532e..e761329d157 100644
--- a/librpc/rpc/dcesrv_core.c
+++ b/librpc/rpc/dcesrv_core.c
@@ -32,6 +32,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
@@ -2633,16 +2634,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;
-- 
2.29.2