MinGW make error in unit-test-server.c #169

Closed
ghost opened this Issue Nov 25, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@ghost

ghost commented Nov 25, 2013

when compiling the newest libmodbus master branch
with the newest MinGW (GCC 4.8.1) on Win7 via the steps:

autogen.sh
./configure
make

make breaks with:

unit-test-server.c:24:24: fatal error: sys/socket.h: No such file or directory

it can be resolved by replacing in tests/unit-test-server.c line 24

#include <sys/socket.h>

with

#ifdef _WIN32
# include <winsock2.h>
#else
# include <sys/socket.h>
#endif

@stephane stephane closed this in 946fb25 Nov 25, 2013

@stephane

This comment has been minimized.

Show comment
Hide comment
@stephane

stephane Nov 25, 2013

Owner

Thank you, I'll try to review your others PR ASAP!

Owner

stephane commented Nov 25, 2013

Thank you, I'll try to review your others PR ASAP!

mk8 added a commit to mk8/libmodbus that referenced this issue Jan 29, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment