]> git.draconx.ca Git - gentoo-draconx.git/blob - net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch
Add ebuilds for ypbind.
[gentoo-draconx.git] / net-nds / ypbind / files / ypbind-1.38-fix-systemd-configuration.patch
1 From 2b4c5d43eaf14b93f2cf0fc7959926606f811f37 Mon Sep 17 00:00:00 2001
2 From: Nick Bowler <nbowler@draconx.ca>
3
4 ---
5  configure.ac    | 11 +++++++++--
6  src/ypbind-mt.c |  2 +-
7  2 files changed, 10 insertions(+), 3 deletions(-)
8
9 diff --git a/configure.ac b/configure.ac
10 index 47ff5db30a54..6d909ce861fb 100644
11 --- a/configure.ac
12 +++ b/configure.ac
13 @@ -44,8 +44,15 @@ AC_CHECK_LIB(nsl, yp_get_default_domain)
14  AC_CHECK_LIB(socket, bind)
15  AC_CHECK_LIB(pthread, pthread_create)
16  
17 -PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])
18 -AC_SUBST(USE_SD_NOTIFY)
19 +AC_ARG_WITH([systemd], [AS_HELP_STRING([--with-systemd], [build against libsystemd])])
20 +
21 +USE_SD_NOTIFY=0
22 +AS_IF([test x"$with_systemd" != x"no"],
23 +  [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
24 +    [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])])
25 +AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"],
26 +  [AC_MSG_ERROR([systemd requested but libsystemd not found])])
27 +AC_SUBST([USE_SD_NOTIFY])
28  
29  AC_ARG_ENABLE([dbus-nm],
30     AC_HELP_STRING([--enable-dbus-nm],[Enable DBUS/NetworkManager support]),
31 diff --git a/src/ypbind-mt.c b/src/ypbind-mt.c
32 index 2012eb8e8642..79f25eb3ea22 100644
33 --- a/src/ypbind-mt.c
34 +++ b/src/ypbind-mt.c
35 @@ -49,7 +49,7 @@
36  #if defined(HAVE_NSS_H)
37  #include <nss.h>
38  #endif
39 -#if defined(HAVE_SYSTEMD_SD_DAEMON_H)
40 +#if USE_SD_NOTIFY
41  #include <systemd/sd-daemon.h>
42  #endif
43  
44 -- 
45 2.16.4
46