Mercurial > hg > freeDiameter
changeset 815:958d3efb45b5
Add test for AI_ADDRCONFIG for platforms where it does not exist
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Mon, 27 Aug 2012 13:17:15 +0200 |
parents | 84bdbd87cbd5 |
children | af62a5485fa2 |
files | include/freeDiameter/CMakeLists.txt include/freeDiameter/freeDiameter-host.h.in libfdcore/fdcore-internal.h |
diffstat | 3 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/include/freeDiameter/CMakeLists.txt Sat Aug 25 22:24:53 2012 +0200 +++ b/include/freeDiameter/CMakeLists.txt Mon Aug 27 13:17:15 2012 +0200 @@ -157,6 +157,11 @@ SET(GCRYPT_LIBRARY ${GCRYPT_LIBRARY} PARENT_SCOPE) +# Check if AI_ADDRCONFIG is available on the system +CHECK_SYMBOL_EXISTS(AI_ADDRCONFIG "netdb.h" HAVE_AI_ADDRCONFIG) + + + ########################## # LFDPROTO_LIBS = libraries required by the libfdproto.
--- a/include/freeDiameter/freeDiameter-host.h.in Sat Aug 25 22:24:53 2012 +0200 +++ b/include/freeDiameter/freeDiameter-host.h.in Mon Aug 27 13:17:15 2012 +0200 @@ -40,6 +40,7 @@ #cmakedefine HAVE_NTOHLL #cmakedefine HAVE_MALLOC_H #cmakedefine HAVE_SIGNALENT_H +#cmakedefine HAVE_AI_ADDRCONFIG #cmakedefine HOST_BIG_ENDIAN @HOST_BIG_ENDIAN@
--- a/libfdcore/fdcore-internal.h Sat Aug 25 22:24:53 2012 +0200 +++ b/libfdcore/fdcore-internal.h Mon Aug 27 13:17:15 2012 +0200 @@ -46,6 +46,10 @@ #define IPPROTO_SCTP (2 = 4) /* some compilation error to spot the references */ #endif /* DISABLE_SCTP */ +#ifndef HAVE_AI_ADDRCONFIG +#define AI_ADDRCONFIG 0 /* ignore this flag at the moment */ +#endif /* HAVE_AI_ADDRCONFIG */ + /* Timeout for establishing a connection */ #ifndef CNX_TIMEOUT #define CNX_TIMEOUT 10 /* in seconds */