From 8bdfaeaabc6035b79da75a20d962f459ee673aae Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: May 26 2008 09:54:33 +0000 Subject: - fix bad allocation --- diff --git a/squid-3.0.STABLE5-bad_allocation b/squid-3.0.STABLE5-bad_allocation index 233ccd2..9725841 100644 --- a/squid-3.0.STABLE5-bad_allocation +++ b/squid-3.0.STABLE5-bad_allocation @@ -1,7 +1,7 @@ -diff -up squid-3.0.STABLE5/src/tools.cc.bad_allocation squid-3.0.STABLE5/src/tools.cc ---- squid-3.0.STABLE5/src/tools.cc.bad_allocation 2008-05-21 10:49:55.000000000 +0200 -+++ squid-3.0.STABLE5/src/tools.cc 2008-05-21 10:50:02.000000000 +0200 -@@ -1343,8 +1343,8 @@ static void +diff -up squid-3.0.STABLE6/src/tools.cc.bad_allocation squid-3.0.STABLE6/src/tools.cc +--- squid-3.0.STABLE6/src/tools.cc.bad_allocation 2008-05-20 17:01:16.000000000 +0200 ++++ squid-3.0.STABLE6/src/tools.cc 2008-05-23 11:14:24.000000000 +0200 +@@ -1354,10 +1354,14 @@ static void restoreCapabilities(int keep) { #if defined(_SQUID_LINUX_) && HAVE_SYS_CAPABILITY_H @@ -10,5 +10,11 @@ diff -up squid-3.0.STABLE5/src/tools.cc.bad_allocation squid-3.0.STABLE5/src/too + cap_user_header_t head = (cap_user_header_t) xcalloc(1, sizeof(*head)); + cap_user_data_t cap = (cap_user_data_t) xcalloc(1, sizeof(*cap)); ++#ifdef _LINUX_CAPABILITY_VERSION_1 ++ head->version = _LINUX_CAPABILITY_VERSION_1; ++#else head->version = _LINUX_CAPABILITY_VERSION; ++#endif + if (capget(head, cap) != 0) { + debugs(50, 1, "Can't get current capabilities"); diff --git a/squid.spec b/squid.spec index 09c845c..045d5c3 100644 --- a/squid.spec +++ b/squid.spec @@ -4,7 +4,7 @@ Name: squid Version: 3.0.STABLE6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Squid proxy caching server Epoch: 7 License: GPLv2+