From d0fa92bc6f44c27a483521a9aa08d719763efcc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20M=C3=BCller?= Date: Thu, 11 Jul 2019 09:49:33 +0200 Subject: [PATCH] Fix posix.c for mingw-w64 Fix warning "Please include winsock2.h before windows.h" on i686 Fix link error with gethostname on x86_64 * libguile/posix.c: for mingw-w64 add #undef gethostname directly after unitstd.h which otherwise is gethostname_used_without_requesting_gnulib_module_gethostname on x86_64 and causes an link error also add #include to fix warning on i686 --- libguile/posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libguile/posix.c b/libguile/posix.c index 728b18b67..c4ed4e6b6 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -33,6 +33,11 @@ #include #include +#ifdef __MINGW32__ +# undef gethostname +# include +#endif + #ifdef HAVE_SCHED_H # include #endif -- 2.22.0