#4 Builderror on Ubuntu 12.04 (amd64)

Mikael Magnusson

Builderrors worked around by removing -Wshadow (error: declaration of ‘index’ shadows a global declaration) and adding -D_BSD_SOURCE (s6_addr32 not working otherwise) to AM_CFLAGS.


  • Can you post full compilation logs ?

  • Logs uploaded

  • It is strange because the code don't use s6_addr32. Can you post your /usr/include/netinet/in.h, please ?

  • You find it at: svn cat svn://svn.eglibc.org/trunk/libc/inet/netinet/in.h

    #ifdef __GNUC__
    # define IN6_IS_ADDR_UNSPECIFIED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->s6_addr32[0] == 0 \ && __a->s6_addr32[1] == 0 \ && __a->s6_addr32[2] == 0 \ && __a->s6_addr32[3] == 0; }))

  • OK, I understand now.

    It seems that the IN6_ADDR_* macro are defined with s6_addr32 if __GNUC__ is used (which is always the case for gcc) and the s6_addr32 in in6_addr structure are only defined if __USE_MISC or __USE_GNU.

    So it seems eglic has introduced this "bug" recently. Can you report that to them or Ubuntu team ?

    TurnServer respects the ISO C99 and POSIX standard and I don't want to use GNU or other non-standard extension (__BSD_SOURCE), so I will try to see if something can be done to override this in the TurnServer code.

  • Do you have a reference to the part of the ISO C99 or POSIX standard defining the IN6_ADDR_* macros in that case?

  • It is defined in the RFC 3493

    As the API matured and stabilized, it was incorporated into the Open
    Group's Networking Services (XNS) specification, issue 5.2, which was
    subsequently incorporated into a joint Open Group/IEEE/ISO standard
    [3] IEEE Std. 1003.1-2001 Standard for Information Technology --
    Portable Operating System Interface (POSIX). Open Group
    Technical Standard: Base Specifications, Issue 6, December 2001.
    ISO/IEC 9945:2002. http://www.opengroup.org/austin

  • I finally decided to modify source code to make it possible to compile on recent glibc (now 2.17 on Debian testing), by adding the _SVID_SOURCE compilation flag.

    Fix is in SVN revision 235.

    • status: open --> accepted
    • assigned_to: Sebastien Vincent
    • Group: --> v1.0_(example)
    • status: accepted --> closed-invalid