diff --git a/dnsmasq-newglibc.patch b/dnsmasq-newglibc.patch new file mode 100644 index 0000000..b9d358e --- /dev/null +++ b/dnsmasq-newglibc.patch @@ -0,0 +1,51 @@ +diff -urN dnsmasq-2.41/CHANGELOG dnsmasq-2.42test1/CHANGELOG +--- dnsmasq-2.41/CHANGELOG 2008-02-11 05:48:46.000000000 -0600 ++++ dnsmasq-2.42test1/CHANGELOG 2008-02-13 15:06:43.000000000 -0600 +@@ -2462,6 +2462,9 @@ + when debug mode is set. Thanks to cedric Duval for the + patch. + ++version 2.42 (backported fix) ++ Define __USE_GNU to avoid problems with later glibc ++ headers. Thanks to Jima for spotting the problem. + + + +diff -urN dnsmasq-2.41/src/config.h dnsmasq-2.42test1/src/config.h +--- dnsmasq-2.41/src/config.h 2008-02-12 05:03:28.000000000 -0600 ++++ dnsmasq-2.42test1/src/config.h 2008-02-13 15:07:05.000000000 -0600 +@@ -85,13 +85,6 @@ + #endif + + +-/* Get linux C library versions. */ +-#if defined(__linux__) && !defined(__UCLIBC__) && !defined(__uClinux__) +-/*# include */ +-# include +-#endif +- +- + /* Follows system specific switches. If you run on a + new system, you may want to edit these. + May replace this with Autoconf one day. +diff -urN dnsmasq-2.41/src/dnsmasq.h dnsmasq-2.42test1/src/dnsmasq.h +--- dnsmasq-2.41/src/dnsmasq.h 2008-02-01 15:42:35.000000000 -0600 ++++ dnsmasq-2.42test1/src/dnsmasq.h 2008-02-13 14:38:39.000000000 -0600 +@@ -17,6 +17,17 @@ + #define COPYRIGHT "Copyright (C) 2000-2008 Simon Kelley" + + /* get these before config.h for IPv6 stuff... */ ++/* Get linux C library versions. */ ++#ifdef __linux__ ++# include ++#endif ++ ++#ifdef __GLIBC__ ++/* needed for in6_pktinfo on later glibc releases */ ++# define __USE_GNU ++# define _GNU_SOURCE ++#endif ++ + #include + #include + diff --git a/dnsmasq.spec b/dnsmasq.spec index d14abb1..16de417 100644 --- a/dnsmasq.spec +++ b/dnsmasq.spec @@ -11,15 +11,16 @@ Name: dnsmasq Version: 2.41 -Release: 0.7%{?extraversion}%{?dist} +Release: 0.8%{?extraversion}%{?dist} Summary: A lightweight DHCP/caching DNS server Group: System Environment/Daemons -License: GPLv2 +License: GPLv2 or GPLv3 URL: http://www.thekelleys.org.uk/dnsmasq/ Source0: http://www.thekelleys.org.uk/dnsmasq/%{?extrapath}%{name}-%{version}%{?extraversion}.tar.gz Patch0: %{name}-2.33-initscript.patch Patch1: %{name}-configuration.patch +Patch2: %{name}-newglibc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: dbus-devel @@ -46,6 +47,7 @@ machines. %setup -q -n %{name}-%{version}%{?extraversion} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build make %{?_smp_mflags} @@ -109,6 +111,9 @@ fi %changelog +* Wed Feb 13 2008 Patrick "Jima" Laughton 2.41-0.8 +- Added upstream-authored patch for newer glibc (thanks Simon!) + * Wed Feb 13 2008 Patrick "Jima" Laughton 2.41-0.7 - New upstream release