From: Orgad Shaneh Date: Mon, 6 Jan 2020 20:56:32 +0000 (+0200) Subject: Fix compiler warnings on MSYS2/Cygwin X-Git-Tag: libpcap-1.10-bp~300^2 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/004d48aa51a5ec5488f477a7b318459ac1a09e26 Fix compiler warnings on MSYS2/Cygwin /f/Projects/libpcap/fmtutils.c:114:20: warning: initialization of ג€˜char *ג€™ from ג€˜intג€™ makes pointer from integer without a cast [-Wint-conversion] 114 | char *errstring = strerror_r(errnum, strerror_buf, PCAP_ERRBUF_SIZE); | ^~~~~~~~~~ CMake executes the test for strerror_r with GNU_SOURCE defined, but the actual application did not define it. --- diff --git a/ftmacros.h b/ftmacros.h index cd3daebd..bb08a11a 100644 --- a/ftmacros.h +++ b/ftmacros.h @@ -83,7 +83,7 @@ * least with HP's C compiler; hopefully doing so won't make it * *not* work with *un*-threaded code. */ -#elif defined(__linux__) || defined(linux) || defined(__linux) +#elif defined(__linux__) || defined(linux) || defined(__linux) || defined(__CYGWIN__) /* * Turn on _GNU_SOURCE to get everything GNU libc has to offer, * including asprintf().