diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-01-23 09:28:27 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-01-23 09:28:44 -0800 |
commit | 0d9efb959673c3867e5f916793c83d3f08a2cf22 (patch) | |
tree | 26ea07007f9929eb2291420c9101acbf7e6c1799 /addrtoname.c | |
parent | c331dc185f9a485974851c17ce1d12e28bb234d4 (diff) | |
download | tcpdump-0d9efb959673c3867e5f916793c83d3f08a2cf22.tar.gz |
On Windows, we have our own ether_ntohost(); declare it.
Move the source to our own ether_ntohost() to the "missing" directory,
just as we do in libpcap for the Windows snprintf() wrapper around
_snprintf().
Add a header file for it, and include it in both the wrapper and in
addrtoname.c on Windows.
Diffstat (limited to 'addrtoname.c')
-rw-r--r-- | addrtoname.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/addrtoname.c b/addrtoname.c index 03fd5a07..55937929 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -40,7 +40,13 @@ #define HTONS(x) (x) = htons(x) #endif -#ifndef _WIN32 +#ifdef _WIN32 + /* + * We have our own ether_ntohost(), reading from the system's + * Ethernet address file. + */ + #include "missing/win_ether_ntohost.h" +#else #ifdef USE_ETHER_NTOHOST #if defined(NET_ETHERNET_H_DECLARES_ETHER_NTOHOST) /* |