stephane / libmodbus

A Modbus library for Linux, Mac OS, FreeBSD and Windows
http://libmodbus.org
GNU Lesser General Public License v2.1
3.33k stars 1.71k forks source link

MinGW make error 'MSG_NOSIGNAL' undeclared in unit-test-server.c #175

Closed ghost closed 10 years ago

ghost commented 10 years ago

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:200:43: error: 'MSG_NOSIGNAL' undeclared

it can be resolved (like in src/modbus-tcp.c) by adding

#ifndef MSG_NOSIGNAL
# define MSG_NOSIGNAL 0
#endif

in tests/unit-test-server.c before the line

#include "unit-test.h"
stephane commented 10 years ago

Thank you. I'm running out of time this week but I'll look to the other Windows issues ASAP...