Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

ghost opened this issue Nov 25, 2013 · 1 comment

Comments

@ghost
Copy link

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
Copy link
Owner

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

mk8 pushed 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant