From 058ebcd88e885f33952c41e570839cd17053b538 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 5 Apr 2013 13:35:22 +0100 Subject: [PATCH] sd-daemon.c: allow use of -lrt to be avoided In recent glibc, many commonly-used librt functions have moved from librt to libc. This results in dbus' configure.ac concluding that we don't need to link in librt. However, sd-daemon.c needs it for mq_getattr(), causing the build to fail. dbus doesn't use POSIX message queues, so I'd prefer to be able to avoid "if on Linux, link librt for sd-daemon.c". --- src/libsystemd-daemon/sd-daemon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libsystemd-daemon/sd-daemon.c b/src/libsystemd-daemon/sd-daemon.c index b1ff431..9cc1c37 100644 --- a/src/libsystemd-daemon/sd-daemon.c +++ b/src/libsystemd-daemon/sd-daemon.c @@ -47,7 +47,7 @@ #include #include -#if defined(__linux__) +#if defined(__linux__) && !defined(SD_DAEMON_DISABLE_MQ) # include #endif @@ -387,7 +387,7 @@ _sd_export_ int sd_is_socket_unix(int fd, int type, int listening, const char *p } _sd_export_ int sd_is_mq(int fd, const char *path) { -#if !defined(__linux__) +#if !defined(__linux__) || defined(SD_DAEMON_DISABLE_MQ) return 0; #else struct mq_attr attr; -- 1.7.10.4