From: Amos Jeffries Date: Mon, 4 Mar 2024 10:45:23 +0000 (+0000) Subject: Maintenance: update --with-systemd detection (#1715) X-Git-Tag: SQUID_7_0_1~186 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=553b28e705b1d77f81e2bf62d524b3550fe3d00b;p=thirdparty%2Fsquid.git Maintenance: update --with-systemd detection (#1715) Drop support for obsolete systemd v209 and older. --- diff --git a/configure.ac b/configure.ac index 2a2c9c3846..208edada6d 100644 --- a/configure.ac +++ b/configure.ac @@ -1259,20 +1259,13 @@ SQUID_CHECK_LIB_WORKS(ldap,[ ]) SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD]) -AH_TEMPLATE(USE_SYSTEMD,[systemd support is available]) SQUID_CHECK_LIB_WORKS(systemd,[ SQUID_STATE_SAVE(squid_systemd_state) LIBS="$LIBS $LIBSYSTEMD_PATH" - PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd],,[ - # systemd < 209 - PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd-daemon],,[:]) - ]) - AC_CHECK_HEADERS(systemd/sd-daemon.h) + PKG_CHECK_MODULES(LIBSYSTEMD,[libsystemd >= 209],[ + AC_CHECK_HEADERS(systemd/sd-daemon.h) + ],[:]) SQUID_STATE_ROLLBACK(squid_systemd_state) - - AS_IF([test "x$LIBSYSTEMD_LIBS" != "x"],[ - AC_DEFINE(USE_SYSTEMD,1,[systemd support is available]) - ]) ]) AC_ARG_ENABLE(forw-via-db, diff --git a/src/client_side.cc b/src/client_side.cc index c9a3a510a6..eac7d93528 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3369,7 +3369,7 @@ clientListenerConnectionOpened(AnyP::PortCfgPointer &s, const Ipc::FdNoteId port Must(AddOpenedHttpSocket(s->listenConn)); // otherwise, we have received a fd we did not ask for -#if USE_SYSTEMD +#if HAVE_LIBSYSTEMD // When the very first port opens, tell systemd we are able to serve connections. // Subsequent sd_notify() calls, including calls during reconfiguration, // do nothing because the first call parameter is 1.