bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

poll: fix link error on native Windows


From: Bruno Haible
Subject: poll: fix link error on native Windows
Date: Thu, 11 May 2017 01:09:30 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-75-generic; KDE/5.18.0; x86_64; ; )

On mingw (and similarly MSVC), I'm getting this link error:

i686-w64-mingw32-gcc  -g -O2  -L/usr/local/mingw32/lib -o test-poll.exe 
test-poll.o libtests.a ../gllib/libgnu.a libtests.a  -lws2_32 -lws2_32
../gllib/libgnu.a(poll.o): In function `windows_compute_revents_socket':
../../gllib/poll.c:250: undefined reference to 
`recv_used_without_requesting_gnulib_module_recv'

This fixes it:


2017-05-10 Bruno Haible  <address@hidden>

        poll: Fix link error on native Windows.
        * lib/poll.c [WINDOWS_NATIVE]: Undefine recv.

diff --git a/lib/poll.c b/lib/poll.c
index 9115bcd..c4b2127 100644
--- a/lib/poll.c
+++ b/lib/poll.c
@@ -76,6 +76,10 @@
 
 #ifdef WINDOWS_NATIVE
 
+/* Here we need the recv() function from Windows, that takes a SOCKET as
+   first argument, not any possible gnulib override.  */
+# undef recv
+
 static BOOL IsConsoleHandle (HANDLE h)
 {
   DWORD mode;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]