summaryrefslogtreecommitdiffstats
path: root/patches/dbus-1.4.8/0004-use-SOCK_CLOEXEC-only-if-available.patch
blob: c8a54068c80eaa479eff83f29ceb08c002991061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sd-daemon.c: In function 'sd_notify':
sd-daemon.c:356: error: 'SOCK_CLOEXEC' undeclared (first use in this function)

---
 dbus/sd-daemon.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: dbus-1.4.1/dbus/sd-daemon.c
===================================================================
--- dbus-1.4.1.orig/dbus/sd-daemon.c
+++ dbus-1.4.1/dbus/sd-daemon.c
@@ -43,6 +43,11 @@
 
 #include "sd-daemon.h"
 
+/* only available on linux >= 2.6.27 */
+#ifndef SOCK_CLOEXEC
+#define SOCK_CLOEXEC 0
+#endif
+
 int sd_listen_fds(int unset_environment) {
 
 #if defined(DISABLE_SYSTEMD) || !defined(__linux__)