Re: [PATCH] build: use _DEFAULT_SOURCE for newer glibc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19 Aug 2015 09:09, Jan Engelhardt wrote:
> On Wednesday 2015-08-19 00:07, Mike Frysinger wrote:
> >Since _BSD_SOURCE is deprecated with newer glibc versions, we get build
> >warnings when using only that define.  Add the newer _DEFAULT_SOURCE to
> >quiet things down.
> 
> Why do we even need _BSD_SOURCE/_ISOC99_SOURCE/_DEFAULT_SOURCE? The 
> thing apparently builds without it (glibc-2.19), too.

i would check with the guy who committed this ;)

commit 9921f2b9a241750e4730fc7d486687c6a32779f4
Author: Jan Engelhardt <jengelh@xxxxxxx>
Date:   Wed Oct 10 00:35:14 2012 +0000

    build: resolve compile abort in libxt_limit on RHEL5
    
    libxt_limit.c: In function 'print_rate':
        libxt_limit.c:124: error: 'INFINITY' undeclared (first use in
        this function)
    
    The default mode of glibc-2.15's <features.h> sets
    "-D_POSIX_C_SOURCE=200809L", and therefore "-D_ISOC99_SOURCE". However,
    on þe olde RHEL 5's glibc-2.5, it only has "-D_POSIX_C_SOURCE=200112L".
    
    Explicitly draw in the definition of INFINITY by always defining
    _ISOC99_SOURCE. By doing this, we are moving off of the default set, so
    _BSD_SOURCE also needs to be explicitly set to get at IFNAMSIZ that is
    used in xt_hashlimit.h.
    
    Signed-off-by: Jan Engelhardt <jengelh@xxxxxxx>
    Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
-mike

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux