]> git.draconx.ca Git - gentoo-draconx.git/blobdiff - 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
diff --git a/net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch b/net-nds/ypbind/files/ypbind-1.38-fix-systemd-configuration.patch
new file mode 100644 (file)
index 0000000..089c557
--- /dev/null
@@ -0,0 +1,46 @@
+From 2b4c5d43eaf14b93f2cf0fc7959926606f811f37 Mon Sep 17 00:00:00 2001
+From: Nick Bowler <nbowler@draconx.ca>
+
+---
+ configure.ac    | 11 +++++++++--
+ src/ypbind-mt.c |  2 +-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 47ff5db30a54..6d909ce861fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -44,8 +44,15 @@ AC_CHECK_LIB(nsl, yp_get_default_domain)
+ AC_CHECK_LIB(socket, bind)
+ AC_CHECK_LIB(pthread, pthread_create)
+-PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])
+-AC_SUBST(USE_SD_NOTIFY)
++AC_ARG_WITH([systemd], [AS_HELP_STRING([--with-systemd], [build against libsystemd])])
++
++USE_SD_NOTIFY=0
++AS_IF([test x"$with_systemd" != x"no"],
++  [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209],
++    [USE_SD_NOTIFY=1], [USE_SD_NOTIFY=0])])
++AS_IF([test x"$with_systemd" = x"yes" && test x"$USE_SD_NOTIFY" = x"0"],
++  [AC_MSG_ERROR([systemd requested but libsystemd not found])])
++AC_SUBST([USE_SD_NOTIFY])
+ AC_ARG_ENABLE([dbus-nm],
+    AC_HELP_STRING([--enable-dbus-nm],[Enable DBUS/NetworkManager support]),
+diff --git a/src/ypbind-mt.c b/src/ypbind-mt.c
+index 2012eb8e8642..79f25eb3ea22 100644
+--- a/src/ypbind-mt.c
++++ b/src/ypbind-mt.c
+@@ -49,7 +49,7 @@
+ #if defined(HAVE_NSS_H)
+ #include <nss.h>
+ #endif
+-#if defined(HAVE_SYSTEMD_SD_DAEMON_H)
++#if USE_SD_NOTIFY
+ #include <systemd/sd-daemon.h>
+ #endif
+-- 
+2.16.4
+