From 004d48aa51a5ec5488f477a7b318459ac1a09e26 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 6 Jan 2020 22:56:32 +0200 Subject: [PATCH] Fix compiler warnings on MSYS2/Cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /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. --- ftmacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftmacros.h b/ftmacros.h index cd3daebdf1..bb08a11a2b 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().