dnsmasq/dnsmasq-newglibc.patch

52 lines
1.6 KiB
Diff

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 <libio.h> */
-# include <features.h>
-#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 <features.h>
+#endif
+
+#ifdef __GLIBC__
+/* needed for in6_pktinfo on later glibc releases */
+# define __USE_GNU
+# define _GNU_SOURCE
+#endif
+
#include <sys/types.h>
#include <netinet/in.h>