mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix inet_ntop and inet_pton warnings in windows compile.
git-svn-id: file:///svn/unbound/trunk@3969 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
33ba1f38d6
commit
db2cf53e7b
4 changed files with 112 additions and 0 deletions
16
config.h.in
16
config.h.in
|
|
@ -68,6 +68,14 @@
|
||||||
if you don't. */
|
if you don't. */
|
||||||
#undef HAVE_DECL_ARC4RANDOM_UNIFORM
|
#undef HAVE_DECL_ARC4RANDOM_UNIFORM
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_INET_NTOP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_INET_PTON
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
|
/* Define to 1 if you have the declaration of `NID_secp384r1', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_NID_SECP384R1
|
#undef HAVE_DECL_NID_SECP384R1
|
||||||
|
|
@ -1061,6 +1069,14 @@ char *strsep(char **stringp, const char *delim);
|
||||||
int isblank(int c);
|
int isblank(int c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
|
||||||
|
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
|
||||||
|
int inet_pton(int af, const char* src, void* dst);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
|
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
|
||||||
#define strptime unbound_strptime
|
#define strptime unbound_strptime
|
||||||
struct tm;
|
struct tm;
|
||||||
|
|
|
||||||
65
configure
vendored
65
configure
vendored
|
|
@ -18974,6 +18974,71 @@ if echo $build_os | grep darwin8 > /dev/null; then
|
||||||
$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
|
$as_echo "#define DARWIN_BROKEN_SETREUID 1" >>confdefs.h
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "
|
||||||
|
$ac_includes_default
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
"
|
||||||
|
if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_INET_PTON $ac_have_decl
|
||||||
|
_ACEOF
|
||||||
|
ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "
|
||||||
|
$ac_includes_default
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
"
|
||||||
|
if test "x$ac_cv_have_decl_inet_ntop" = xyes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_INET_NTOP $ac_have_decl
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
|
ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
|
||||||
if test "x$ac_cv_func_inet_aton" = xyes; then :
|
if test "x$ac_cv_func_inet_aton" = xyes; then :
|
||||||
$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
|
$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
|
||||||
|
|
|
||||||
30
configure.ac
30
configure.ac
|
|
@ -1152,6 +1152,28 @@ AC_CHECK_FUNCS([setresgid],,[AC_CHECK_FUNCS([setregid])])
|
||||||
if echo $build_os | grep darwin8 > /dev/null; then
|
if echo $build_os | grep darwin8 > /dev/null; then
|
||||||
AC_DEFINE(DARWIN_BROKEN_SETREUID, 1, [Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work])
|
AC_DEFINE(DARWIN_BROKEN_SETREUID, 1, [Define this if on macOSX10.4-darwin8 and setreuid and setregid do not work])
|
||||||
fi
|
fi
|
||||||
|
AC_CHECK_DECLS([inet_pton,inet_ntop], [], [], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
AC_REPLACE_FUNCS(inet_aton)
|
AC_REPLACE_FUNCS(inet_aton)
|
||||||
AC_REPLACE_FUNCS(inet_pton)
|
AC_REPLACE_FUNCS(inet_pton)
|
||||||
AC_REPLACE_FUNCS(inet_ntop)
|
AC_REPLACE_FUNCS(inet_ntop)
|
||||||
|
|
@ -1464,6 +1486,14 @@ char *strsep(char **stringp, const char *delim);
|
||||||
int isblank(int c);
|
int isblank(int c);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP
|
||||||
|
const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON
|
||||||
|
int inet_pton(int af, const char* src, void* dst);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
|
#if !defined(HAVE_STRPTIME) || !defined(STRPTIME_WORKS)
|
||||||
#define strptime unbound_strptime
|
#define strptime unbound_strptime
|
||||||
struct tm;
|
struct tm;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
15 December 2016: Wouter
|
15 December 2016: Wouter
|
||||||
- iana portlist update
|
- iana portlist update
|
||||||
- 64bit is default for windows builds.
|
- 64bit is default for windows builds.
|
||||||
|
- Fix inet_ntop and inet_pton warnings in windows compile.
|
||||||
|
|
||||||
14 December 2016: Wouter
|
14 December 2016: Wouter
|
||||||
- Fix #1178: attempt to fix setup error at end, pop result values
|
- Fix #1178: attempt to fix setup error at end, pop result values
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue