Resolves: rhbz#1392916 - sssd failes to start after update Resolves: rhbz#1398789 - SELinux is preventing sssd from 'write' accesses on the directory /etc/sssd
62 lines
1.9 KiB
Diff
62 lines
1.9 KiB
Diff
From 90adb9afec7b3cd2f6548d7f050785777492c827 Mon Sep 17 00:00:00 2001
|
|
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
Date: Mon, 7 Nov 2016 11:53:21 +0100
|
|
Subject: [PATCH 20/39] BUILD: Fix linking with librt
|
|
|
|
The posix realime extensions defines timer_* functions
|
|
but it does not mention library with these functions.
|
|
http://www.unix.org/version2/whatsnew/realtime.html
|
|
|
|
The autoconf macro AC_SEARCH_LIBS firstly check the function
|
|
timer_create with no libraries, then for each library listed
|
|
in 2nd parameter. Possible libraries librt and libposix4
|
|
were used in nspr for similar detection.
|
|
|
|
Reviewed-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
|
|
(cherry picked from commit 6d11fdcd8ef05000dd20b3431f8491790f99a802)
|
|
(cherry picked from commit a3b668868a1c10be63be9151d347100172b71c6c)
|
|
---
|
|
Makefile.am | 1 +
|
|
configure.ac | 13 +++++++++++++
|
|
2 files changed, 14 insertions(+)
|
|
|
|
diff --git a/Makefile.am b/Makefile.am
|
|
index d08e39fa4..51c67360d 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -960,6 +960,7 @@ libsss_util_la_CFLAGS = \
|
|
$(SYSTEMD_LOGIN_CFLAGS) \
|
|
$(NULL)
|
|
libsss_util_la_LIBADD = \
|
|
+ $(LIBADD_TIMER) \
|
|
$(SSSD_LIBS) \
|
|
$(SYSTEMD_LOGIN_LIBS) \
|
|
$(UNICODE_LIBS) \
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 3dbcf9e1f..d3ef1e162 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -70,6 +70,19 @@ AC_CHECK_FUNCS([ pthread_mutexattr_setrobust \
|
|
pthread_mutex_consistent_np ])
|
|
LIBS=$SAVE_LIBS
|
|
|
|
+# Check library for the timer_create function
|
|
+SAVE_LIBS=$LIBS
|
|
+LIBS=
|
|
+LIBADD_TIMER=
|
|
+AC_SEARCH_LIBS([timer_create], [rt posix4],
|
|
+ [AC_DEFINE([HAVE_LIBRT], [1],
|
|
+ [Define if you have the librt library or equivalent.])
|
|
+ LIBADD_TIMER="$LIBS"],
|
|
+ [AC_MSG_ERROR([unable to find library fot the timer_create() function])])
|
|
+
|
|
+AC_SUBST([LIBADD_TIMER])
|
|
+LIBS=$SAVE_LIBS
|
|
+
|
|
# Check for presence of modern functions for setting file timestamps
|
|
AC_CHECK_FUNCS([ utimensat \
|
|
futimens ])
|
|
--
|
|
2.11.0
|
|
|