[Dnsmasq-discuss] Fun with glibc headers

Jima jima at beer.tclug.org
Wed Feb 13 20:45:24 GMT 2008


On Wed, 13 Feb 2008, Simon Kelley wrote:
> Scratch previous message, patch should be
...
> /* get these before config.h  for IPv6 stuff... */
> +#ifdef __GLIBC__
> +/* needed for in6_pktinfo on later glibc releases */
> +#  define __USE_GNU
> +#endif
> #include <sys/types.h>
> #include <netinet/in.h>
>

  Alas, config.h is where features.h seems to get pulled in, which is what 
defines __GLIBC__.  This patch had no effect.  This one, however, got me a 
little different:

diff -up dnsmasq-2.41/src/config.h.orig dnsmasq-2.41/src/config.h
--- dnsmasq-2.41/src/config.h.orig	2008-02-13 10:28:11.000000000 -0600
+++ dnsmasq-2.41/src/config.h	2008-02-13 14:16:17.000000000 -0600
@@ -91,6 +91,10 @@
  #  include <features.h>
  #endif

+#ifdef __GLIBC__
+/* needed for in6_pktinfo on later glibc releases */
+#  define __USE_GNU
+#endif

  /* Follows system specific switches. If you run on a
     new system, you may want to edit these.

  Here's the (failed) build log, if anyone can make more sense out of it 
than I can (which ought not be too difficult):

http://beer.tclug.org/jima/text/dnsmasq-2.41-0.8.2.fc9-build.log

  Thanks Simon.

      Jima



More information about the Dnsmasq-discuss mailing list