[patch] don't use SOCK_CLOEXEC if not available
Robert Schwebel
r.schwebel at pengutronix.de
Fri Aug 6 10:30:11 PDT 2010
Avoids this error:
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.3.2/dbus/sd-daemon.c
===================================================================
--- dbus-1.3.2.orig/dbus/sd-daemon.c
+++ dbus-1.3.2/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__)
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the dbus
mailing list