fix build error

This commit is contained in:
eaglegai 2020-08-03 14:41:06 +08:00
parent 4f7d25ac2d
commit 15d1118efd
2 changed files with 47 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From 195ec8477565885e8f0975865a32bb716ea56272 Mon Sep 17 00:00:00 2001
From: Amos Jeffries <yadij@users.noreply.github.com>
Date: Tue, 19 Nov 2019 01:06:56 +1300
Subject: [PATCH] Fix detection of sys/sysctl.h detection (#511)
Make sure we test the EUI specific headers using same flags
chosen for final build operations. This should make the
test detect the header as unavailable if the user options
would make the compiler #warning be a fatal error later.
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure.ac b/configure.ac
index a1f2823..7cc0dfd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1109,6 +1109,10 @@ AC_ARG_ENABLE(eui,
SQUID_YESNO([$enableval],[--disable-eui expects no arguments])
])
if test "x${enable_eui:=yes}" = "xyes" ; then
+ SQUID_STATE_SAVE(LIBEUI)
+ # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later.
+ CFLAGS=$SQUID_CFLAGS
+ CXXFLAGS=$SQUID_CXXFLAGS
case "$squid_host_os" in
linux|solaris|freebsd|openbsd|netbsd|cygwin)
${TRUE}
@@ -1148,6 +1152,7 @@ include <windows.h>
#include <sys/param.h>
#endif
]])
+ SQUID_STATE_ROLLBACK(LIBEUI)
fi
AC_SUBST(EUILIB)
AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui])
--
1.8.3.1

View File

@ -2,7 +2,7 @@
Name: squid Name: squid
Version: 4.9 Version: 4.9
Release: 2 Release: 3
Summary: The Squid proxy caching server Summary: The Squid proxy caching server
Epoch: 7 Epoch: 7
License: GPLv2+ and (LGPLv2+ and MIT and BSD and Public Domain) License: GPLv2+ and (LGPLv2+ and MIT and BSD and Public Domain)
@ -25,6 +25,7 @@ Patch4: squid-4.0.21-large-acl.patch
Patch5: CVE-2019-12528.patch Patch5: CVE-2019-12528.patch
Patch6: CVE-2020-8517.patch Patch6: CVE-2020-8517.patch
Patch7: CVE-2020-8449_CVE-2020-8450.patch Patch7: CVE-2020-8449_CVE-2020-8450.patch
Patch8: squid-fix-detection-of-sys-sysctl.h-detection-511.patch
Buildroot: %{_tmppath}/squid-4.9-1-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/squid-4.9-1-root-%(%{__id_u} -n)
Requires: bash >= 2.0 Requires: bash >= 2.0
@ -203,6 +204,12 @@ fi
chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || : chgrp squid /var/cache/samba/winbindd_privileged >/dev/null 2>&1 || :
%changelog %changelog
* Mon Aug 03 2020 gaihuiying <gaihuiying1@huawei.com> - 4.9-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error
* Wed Apr 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.9-2 * Wed Apr 22 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.9-2
- Type:cves - Type:cves
- ID:CVE-2019-12528 CVE-2020-8517 CVE-2020-8449 CVE-2020-8450 - ID:CVE-2019-12528 CVE-2020-8517 CVE-2020-8449 CVE-2020-8450