radarsat1 / liblo

liblo is an implementation of the Open Sound Control protocol for POSIX systems
GNU Lesser General Public License v2.1
190 stars 60 forks source link

Fix compilation warning when compiling with 32 bit MinGW #107

Closed tobiasherzke closed 3 years ago

tobiasherzke commented 3 years ago

Compilation with 64 bit MinGW still works after this change.

Without this change, and with -Werror, MinGW32 had complained:

gcc -DHAVE_CONFIG_H -I. -I..    -Wall -I.. -DWIN32 -D_WIN32_WINNT=0x501 -O0 -g -Wall -Werror -DDEBUG -MT test_bidirectional_tcp-test_bidirectional_tcp.o -MD -MP -MF .deps/test_bidirectional_tcp-test_bidirectional_tcp.Tpo -c -o test_bidirectional_tcp-test_bidirectional_tcp.o `test -f 'test_bidirectional_tcp.c' || echo './'`test_bidirectional_tcp.c
test_bidirectional_tcp.c: In function 'main':
test_bidirectional_tcp.c:79:26: error: implicit declaration of function '_beginthreadex' [-Werror=implicit-function-declaration]
   79 |     HANDLE thr = (HANDLE)_beginthreadex(NULL, 0, &sendthread, s, 0, NULL);
      |                          ^~~~~~~~~~~~~~
cc1.exe: all warnings being treated as errors
make[3]: *** [Makefile:930: test_bidirectional_tcp-test_bidirectional_tcp.o] Error 1
tobiasherzke commented 3 years ago

By the way your failing Travis build has nothing to do with this change, you may want to check that failure independently.