SF.net SVN: gar:[26694] csw/mgar/pkg/squid/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Mon Aug 24 09:17:08 CEST 2020


Revision: 26694
          http://sourceforge.net/p/gar/code/26694
Author:   dmichelsen
Date:     2020-08-24 07:17:08 +0000 (Mon, 24 Aug 2020)
Log Message:
-----------
squid/trunk: Add workaround for #5073

Modified Paths:
--------------
    csw/mgar/pkg/squid/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/squid/trunk/files/0001-Replace-index-with-strchr.patch

Modified: csw/mgar/pkg/squid/trunk/Makefile
===================================================================
--- csw/mgar/pkg/squid/trunk/Makefile	2020-08-23 10:32:19 UTC (rev 26693)
+++ csw/mgar/pkg/squid/trunk/Makefile	2020-08-24 07:17:08 UTC (rev 26694)
@@ -16,7 +16,10 @@
 MASTER_SITES = http://www.squid-cache.org/Versions/v$(V1)/
 DISTFILES += $(DISTNAME).tar.xz
 
+# Add workaround until this is fixed:
+#   https://bugs.squid-cache.org/show_bug.cgi?id=5073
 PATCHFILES += 0001-Add-include-for-index.patch
+PATCHFILES += 0001-Replace-index-with-strchr.patch
 
 PACKAGES = CSWsquid
 RUNTIME_DEP_PKGS_CSWsquid += CSWliblber2-4-2

Added: csw/mgar/pkg/squid/trunk/files/0001-Replace-index-with-strchr.patch
===================================================================
--- csw/mgar/pkg/squid/trunk/files/0001-Replace-index-with-strchr.patch	                        (rev 0)
+++ csw/mgar/pkg/squid/trunk/files/0001-Replace-index-with-strchr.patch	2020-08-24 07:17:08 UTC (rev 26694)
@@ -0,0 +1,40 @@
+From 69cb6c1e72e45a8142667b37f6601710005e37a4 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Mon, 24 Aug 2020 08:04:31 +0200
+Subject: [PATCH] Replace 'index' with 'strchr'
+
+---
+ src/esi/VarState.cc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/esi/VarState.cc b/src/esi/VarState.cc
+index c98b285..41fe535 100644
+--- a/src/esi/VarState.cc
++++ b/src/esi/VarState.cc
+@@ -150,7 +150,7 @@ ESIVariableUserAgent::getProductVersion (char const *s)
+ {
+     char const *t;
+     int len;
+-    t = index(s,'/');
++    t = strchr(s,'/');
+ 
+     if (!t || !*(++t))
+         return xstrdup("");
+@@ -328,12 +328,12 @@ ESIVariableUserAgent::ESIVariableUserAgent(ESIVarState &state)
+ 
+         if ((t = strstr (s, "MSIE"))) {
+             browser = ESI_BROWSER_MSIE;
+-            t = index (t, ' ');
++            t = strchr (t, ' ');
+ 
+             if (!t)
+                 browserversion = xstrdup("");
+             else {
+-                t1 = index(t, ';');
++                t1 = strchr(t, ';');
+ 
+                 if (!t1)
+                     browserversion = xstrdup(t + 1);
+-- 
+2.4.0
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list