[Dnsmasq-discuss] Fun with glibc headers

Simon Kelley simon at thekelleys.org.uk
Wed Feb 13 19:52:02 GMT 2008


Jima wrote:
> Hi folks,
> 
>  Our friend Matt Domsch's periodic rebuilds of Fedora packages caught 
> what was originally identified as a GCC 4.3 build failure.  Alas, I'd 
> already had a successful build of 2.41rc1 under GCC 4.3, so it was 
> apparently a false positive.  However, it appears that an odd little 
> change in glibc-headers may have broken things.
>  As of glibc-headers-2.7.90-6 (in Fedora-land), the "struct in6_pktinfo" 
> definition seems to be hidden inside "#ifdef __USE_GNU".  So my question 
> for Simon is: where would be the ideal place to #define that?
> 
>  Here are links to the information I'm basing that conclusion on.
>  My successful build of 2.41rc1, about two weeks ago:
> http://koji.fedoraproject.org/packages/dnsmasq/2.41/0.6.rc1.fc9/data/logs/i386/build.log 
> 
>  Matt's original build failure:
> http://linux.dell.com/files/fedora/FixBuildRequires/mock-results-core/x86_64/dnsmasq-2.41-0.6.rc1.fc9.src.rpm/result/build.log 
> 
>  My build failure when I (successfully) tried to reproduce it on Fedora 
> infrastructure:
> http://koji.fedoraproject.org/koji/getfile?taskID=423530&name=build.log
>  A diff between the working and non-working glibc-headers packages:
> http://beer.tclug.org/jima/text/glibc-headers-2.7.90-4_2.7.90-6.patch
> 
>  I'm not a programmer (just a sysadmin/package monkey), so I welcome 
> anyone to look at the data and chime in with their 
> quite-possibly-more-informed thoughts. :-)

Sigh.

This will probably comes an bite everyone in the end.

As an immediate fix, you could build dnsmasq with

make COPTS=-D__USE_GNU


The fix I'll apply looks like:

--- dnsmasq.old     2008-02-01 21:42:35.000000000 +0000
+++ dnsmasq.h     2008-02-13 19:45:36.000000000 +0000
@@ -17,6 +17,10 @@
  #define COPYRIGHT "Copyright (C) 2000-2008 Simon Kelley"

  /* get these before config.h  for IPv6 stuff... */
+#ifdef HAVE_LINUX_NETWORK
+/* needed for in6_pktinfo on later glibc releases */
+#  define __USE_GNU
+#endif
  #include <sys/types.h>
  #include <netinet/in.h>

Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list