• C
    fix xdr detection and use with recent glibc · 29d753c8
    Christophe Fergeau 提交于
    glibc 2.13.90 has obsoleted its rpc implementation in favour of
    the one provided by the TI-RPC library:
    
    > * The RPC implementation in libc is obsoleted.  Old programs keep working
    >   but new programs cannot be linked with the routines in libc anymore.
    >   Programs in need of RPC functionality must be linked against TI-RPC.
    >   The TI-RPC implemtation is IPv6 enabled and there are other benefits.
    >
    >   Visible changes of this change include (obviously) the inability to
    >   link
    >   programs using RPC functions without referencing the TI-RPC library,
    >   the
    >   removal of the RPC headers from the glibc headers, and the lack of
    >   symbols defined in <rpc/netdb.h> when <netdb.h> is installed.
    >   Implemented by Ulrich Drepper.
    (from glibc NEWS)
    
    Thus with recent glibc, we need to try linking with -ltirpc when looking
    for the XDR functions. The daemon also needs to use XDR_CFLAGS to be able
    to find the XDR headers stored in /usr/include/tirpc.
    
    When using TI-RPC, there are some warnings about redundant declarations, but
    the fix probably belongs in other modules:
    
    /usr/include/tirpc/rpc/rpcent.h:68:13: warning: redundant redeclaration of
    'setrpcent' [-Wredundant-decls]
    /usr/include/rpc/netdb.h:53:13: note: previous declaration of 'setrpcent'
    was here
    
    /usr/include/tirpc/rpc/rpcent.h:69:13: warning: redundant redeclaration of
    'endrpcent' [-Wredundant-decls]
    /usr/include/rpc/netdb.h:54:13: note: previous declaration of 'endrpcent'
    was here
    
    /usr/include/tirpc/rpc/rpc.h:84:12: warning: redundant redeclaration of
    'bindresvport' [-Wredundant-decls]
    /usr/include/netinet/in.h:440:12: note: previous declaration of
    'bindresvport' was here
    29d753c8
configure.ac 81.2 KB