diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-02-10 07:16:08 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2016-02-13 23:51:53 +0000 |
commit | 2e85975feee4304ebc3e47c3b03653094b839b6c (patch) | |
tree | 49e3d4ba3ff3b04108621ea37d0b0e91e5598f76 /wsutil | |
parent | d55f176a2472077eaad9315d525696d24b571e05 (diff) |
Just #include wsutil/inet_aton.h
No need for platform-specific system header boilerplate.
Change-Id: I5387a0005ddb0d7aab3c5b9f28d6282053c1b0fd
Reviewed-on: https://code.wireshark.org/review/13865
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/inet_aton.c | 14 | ||||
-rw-r--r-- | wsutil/inet_aton.h | 18 |
2 files changed, 20 insertions, 12 deletions
diff --git a/wsutil/inet_aton.c b/wsutil/inet_aton.c index ecf64afbca..296b225109 100644 --- a/wsutil/inet_aton.c +++ b/wsutil/inet_aton.c @@ -29,6 +29,8 @@ #include "config.h" +#include "inet_aton.h" + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; #endif /* LIBC_SCCS and not lint */ @@ -37,19 +39,7 @@ static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; #include <sys/param.h> #endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif - -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif - -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif -#include "inet_aton.h" /* * Check whether "cp" is a valid ascii representation diff --git a/wsutil/inet_aton.h b/wsutil/inet_aton.h index bfccb2224f..3d89dc23c2 100644 --- a/wsutil/inet_aton.h +++ b/wsutil/inet_aton.h @@ -28,7 +28,25 @@ #include "ws_symbol_export.h" +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> /* needed to define AF_ values on UNIX */ +#endif + +#ifdef HAVE_NETINET_IN_H +# include <netinet/in.h> +#endif + +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif + +#ifdef HAVE_WINSOCK2_H +#include <winsock2.h> +#endif + +#ifndef HAVE_INET_ATON struct in_addr; WS_DLL_PUBLIC int inet_aton(const char* cp_arg, struct in_addr *addr); +#endif #endif |