summaryrefslogtreecommitdiffstats
path: root/patches/systemd-20/0001-missing-IN_CLOEXIT.patch
blob: e52e96f3ca0bec8bbb33fe6aefafd51976c88874 (plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
src/util.c: In function 'acquire_terminal':
src/util.c:2241: warning: implicit declaration of function 'inotify_init1'
src/util.c:2241: error: 'IN_CLOEXEC' undeclared (first use in this function)

src/socket-util.c: In function 'socket_address_listen':
src/socket-util.c:322: error: 'SOCK_NONBLOCK' undeclared (first use in this function)
src/socket-util.c:322: error: (Each undeclared identifier is reported only once
src/socket-util.c:322: error: for each function it appears in.)
src/socket-util.c:322: error: 'SOCK_CLOEXEC' undeclared (first use in this function)
make[2]: *** [src/socket-util.lo] Error 1


---
 src/job.c         |    8 ++++++++
 src/log.c         |    4 ++++
 src/manager.c     |    8 ++++++++
 src/socket-util.c |    8 ++++++++
 src/unit.c        |    8 ++++++++
 src/util.c        |    4 ++++
 6 files changed, 40 insertions(+)

Index: systemd-13/src/util.c
===================================================================
--- systemd-13.orig/src/util.c
+++ systemd-13/src/util.c
@@ -60,6 +60,10 @@
 #include "label.h"
 #include "exit-status.h"
 
+#ifndef IN_CLOEXEC
+#define IN_CLOEXEC 0
+#endif
+
 bool streq_ptr(const char *a, const char *b) {
 
         /* Like streq(), but tries to make sense of NULL pointers */
Index: systemd-13/src/socket-util.c
===================================================================
--- systemd-13.orig/src/socket-util.c
+++ systemd-13/src/socket-util.c
@@ -38,6 +38,14 @@
 #include "missing.h"
 #include "label.h"
 
+#ifndef SOCK_NONBLOCK
+#define SOCK_NONBLOCK 0
+#endif
+
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
 int socket_address_parse(SocketAddress *a, const char *s) {
         int r;
         char *e, *n;
Index: systemd-13/src/log.c
===================================================================
--- systemd-13.orig/src/log.c
+++ systemd-13/src/log.c
@@ -33,6 +33,10 @@
 
 #define SYSLOG_TIMEOUT_USEC (5*USEC_PER_SEC)
 
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
 static LogTarget log_target = LOG_TARGET_CONSOLE;
 static int log_max_level = LOG_INFO;
 
Index: systemd-13/src/unit.c
===================================================================
--- systemd-13.orig/src/unit.c
+++ systemd-13/src/unit.c
@@ -43,6 +43,14 @@
 #include "cgroup-util.h"
 #include "missing.h"
 
+#ifndef TFD_NONBLOCK
+#define TFD_NONBLOCK 0
+#endif
+
+#ifndef TFD_CLOEXEC
+#define TFD_CLOEXEC 0
+#endif
+
 const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
         [UNIT_SERVICE] = &service_vtable,
         [UNIT_TIMER] = &timer_vtable,
Index: systemd-13/src/job.c
===================================================================
--- systemd-13.orig/src/job.c
+++ systemd-13/src/job.c
@@ -33,6 +33,14 @@
 #include "log.h"
 #include "dbus-job.h"
 
+#ifndef TFD_NONBLOCK
+#define TFD_NONBLOCK 0
+#endif
+
+#ifndef TFD_CLOEXEC
+#define TFD_CLOEXEC 0
+#endif
+
 Job* job_new(Manager *m, JobType type, Unit *unit) {
         Job *j;
 
Index: systemd-13/src/manager.c
===================================================================
--- systemd-13.orig/src/manager.c
+++ systemd-13/src/manager.c
@@ -59,6 +59,14 @@
 #include "bus-errors.h"
 #include "exit-status.h"
 
+#ifndef SOCK_NONBLOCK
+#define SOCK_NONBLOCK 0
+#endif
+
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
 /* As soon as 16 units are in our GC queue, make sure to run a gc sweep */
 #define GC_QUEUE_ENTRIES_MAX 16