Monday, March 26, 2018

[389-commits] [389-ds-base] 01/01: Ticket 49601 - Replace HAVE_SYSTEMD define with WITH_SYSTEMD in svrcore

This is an automated email from the git hooks/post-receive script.

mhonek pushed a commit to branch master
in repository 389-ds-base.

commit a3d3e1a93ab2d7dbac96c79f4a1794f3ddebad81
Author: Matúš Honěk <mhonek@redhat.com>
Date: Mon Mar 26 14:05:51 2018 +0200

Ticket 49601 - Replace HAVE_SYSTEMD define with WITH_SYSTEMD in svrcore

Bug Description: As former configure of svrcore is not used after the
merge of svrcore, and the svrcore's --with-systemd configure flag
handling seems to not have been merged to the 389-ds-core configure,
and configuring svrcore --with-systemd defines HAVE_SYSTEMD which is
different from define WITH_SYSTEMD used in 389-ds-base, the systemd
support in svrcore is not effectively turned on when compiling
389-ds-base with --with-systemd.

Fix Description: Use the very same define as 389-ds-base
uses (WITH_SYSTEMD) instead of the former one of svrcore, which is
obviously inheritted into the svrcore code as well, thus effectively
selecting a code to be compiled based on the --with-systemd configure
flag.

https://pagure.io/389-ds-base/issue/49601

Author: mhonek

Review by: mreynolds, spichugi
---
src/svrcore/m4/systemd.m4 | 2 +-
src/svrcore/src/std-systemd.c | 8 ++++----
src/svrcore/src/systemd-ask-pass.c | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/svrcore/m4/systemd.m4 b/src/svrcore/m4/systemd.m4
index 6052acb..3a22dd9 100644
--- a/src/svrcore/m4/systemd.m4
+++ b/src/svrcore/m4/systemd.m4
@@ -27,7 +27,7 @@ if test "$with_systemd" = yes; then
if test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists systemd; then
AC_MSG_CHECKING([systemd found, enabling.])
- SYSTEMD_CFLAGS="-DHAVE_SYSTEMD"
+ SYSTEMD_CFLAGS="-DWITH_SYSTEMD"
else
AC_MSG_CHECKING([systemd not found, disabling.])
SYSTEMD_CFLAGS=""
diff --git a/src/svrcore/src/std-systemd.c b/src/svrcore/src/std-systemd.c
index c1f8ba8..b4310df 100644
--- a/src/svrcore/src/std-systemd.c
+++ b/src/svrcore/src/std-systemd.c
@@ -48,7 +48,7 @@ SVRCORE_CreateStdSystemdPinObj(
const char *filename, PRBool cachePINs,
PRBool systemdPINs, uint64_t timeout)
{
-#ifdef HAVE_SYSTEMD
+#ifdef WITH_SYSTEMD
SVRCOREError err = SVRCORE_Success;
SVRCOREStdSystemdPinObj *obj = 0;

@@ -155,7 +155,7 @@ void
SVRCORE_DestroyStdSystemdPinObj(
SVRCOREStdSystemdPinObj *obj)
{
-#ifdef HAVE_SYSTEMD
+#ifdef WITH_SYSTEMD
if (!obj) return;

if (obj->user) SVRCORE_DestroyUserPinObj(obj->user);
@@ -174,7 +174,7 @@ SVRCORE_DestroyStdSystemdPinObj(
void
SVRCORE_SetStdSystemdPinInteractive(SVRCOREStdSystemdPinObj *obj, PRBool i)
{
-#ifdef HAVE_SYSTEMD
+#ifdef WITH_SYSTEMD
SVRCORE_SetUserPinInteractive(obj->user, i);

No comments:

Post a Comment