]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5041: Missing Debug::Extra breaks build on hosts with systemd (#611)
authorAlex Rousskov <rousskov@measurement-factory.com>
Thu, 23 Apr 2020 11:56:35 +0000 (05:56 -0600)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 11:56:35 +0000 (23:56 +1200)
* Bug 5041: Missing Debug::Extra breaks build on hosts with systemd

Master commit 6fa8c66 (i.e. Bug 5016 fix) relied on Debug::Extra added
by master commit (ccfbe8f) that was not ported to v4. The port of the
former master commit lacked the required piece of the latter commit.

The problem is invisible on hosts without a systemd package (that Squid
can find/use) and with Squids explicitly ./configured --without-systemd.

* "Minimum features" build test should be --without-systemd

* LDFLAGS were missing SYSTEMD_LIBS in builds with systemd support

Co-authored-by: Amos Jeffries <yadij@users.noreply.github.com>
configure.ac
src/Debug.h
test-suite/buildtests/layer-01-minimal.opts

index 9d1a38c4f86449e91d6d14bfcc06188e404f7f79..281d237bc510607fa1128717cf6d9c0236b3aa90 100644 (file)
@@ -2162,6 +2162,7 @@ if test "x$with_systemd" != "xno" -a "x$squid_host_os" = "xlinux"; then
   fi
   if test "x$SYSTEMD_LIBS" != "x" ; then
     CXXFLAGS="$SYSTEMD_CFLAGS $CXXFLAGS"
+    LDFLAGS="$SYSTEMD_LIBS $LDFLAGS"
     AC_DEFINE(USE_SYSTEMD,1,[systemd support is available])
   else
     with_systemd=no
index 6eecd01bf9e11b36b5754f44632128f492330eb1..ddd9e38f8f2e7289d2a71260df530edd580bf930 100644 (file)
@@ -99,6 +99,10 @@ public:
 
     /// configures the active debugging context to write syslog ALERT
     static void ForceAlert();
+
+    /// prefixes each grouped debugs() line after the first one in the group
+    static std::ostream& Extra(std::ostream &os) { return os << "\n    "; }
+
 private:
     static Context *Current; ///< deepest active context; nil outside debugs()
 };
index 3de29a355040ab45496d8da57afb5cd541684479..603b5b593edb33184ee23c33630bd536dc352f9a 100644 (file)
@@ -108,6 +108,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \
        --without-gnutls \
        --without-openssl \
        --without-po2html \
+       --without-systemd \
        "
 
 # Fix the distclean testing.