chiark / gitweb /
Remove librt dependency.
authorSven Eden <yamakuzure@gmx.net>
Fri, 20 Jan 2017 03:58:34 +0000 (04:58 +0100)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:23:02 +0000 (10:23 +0100)
The only function still using librt was
src/shared/clean-ipc.c::clean_posix_mq().

But that function is not really needed, because elogind does not call
mq_open() anywhere, or any other mqueue related functions.

configure.ac
src/libelogind/sd-daemon/sd-daemon.c
src/shared/clean-ipc.c

index 66a5e3e9a160a78d85ec3a953c9e70a505f5c3a3..351dda27e46d7073494cce51beabf69e358d27dc 100644 (file)
@@ -287,8 +287,8 @@ AC_CHECK_HEADERS([linux/btrfs.h], [], [])
 AC_CHECK_HEADERS([linux/memfd.h], [], [])
 
 # unconditionally pull-in librt with old glibc versions
-AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
-AC_SEARCH_LIBS([mq_unlink], [rt], [], [])
+dnl AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
+dnl AC_SEARCH_LIBS([mq_unlink], [rt], [], [])
 
 AC_ARG_WITH([libcap],
             AS_HELP_STRING([--with-libcap=DIR], [Prefix for libcap]),
index 9a696cd2298f25f6cde22d438426c1e1a5c92df8..d4e0da61d6361f4f742c8ccce8aed10631d3042f 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdio.h>
 #include <stddef.h>
 #include <limits.h>
-#include <mqueue.h>
+//#include <mqueue.h>
 
 #include "util.h"
 #include "path-util.h"
index 48b10865da1b49fbd2ab3ab5019e30116f26be02..95d6c421998ebfd1d2a593d773a88cc8f4523693 100644 (file)
@@ -26,7 +26,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <dirent.h>
-#include <mqueue.h>
+//#include <mqueue.h>
 
 #include "util.h"
 #include "formats-util.h"
@@ -277,6 +277,8 @@ static int clean_posix_shm(uid_t uid) {
         return clean_posix_shm_internal(dir, uid);
 }
 
+/// UNNEEDED by elogind
+#if 0
 static int clean_posix_mq(uid_t uid) {
         _cleanup_closedir_ DIR *dir = NULL;
         struct dirent *de;
@@ -328,6 +330,7 @@ fail:
         log_warning_errno(errno, "Failed to read /dev/mqueue: %m");
         return -errno;
 }
+#endif // 0
 
 int clean_ipc(uid_t uid) {
         int ret = 0, r;
@@ -352,9 +355,12 @@ int clean_ipc(uid_t uid) {
         if (r < 0)
                 ret = r;
 
+/// elogind does not use mq_open anywhere
+#if 0
         r = clean_posix_mq(uid);
         if (r < 0)
                 ret = r;
+#endif // 0
 
         return ret;
 }