zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.45k stars 2.34k forks source link

Unable to build libzmq 4.3.4 with mingw in windows due to sys/socket.h include in src/ipc_address.hpp #4366

Open mthorne-son opened 2 years ago

mthorne-son commented 2 years ago

Issue description

Unable to build libzmq 4.3.4 with mingw in windows due to sys/socket.h include in src/ipc_address.hpp line 40.

code:

if defined _MSC_VER

include

else

include <sys/socket.h>

include <sys/un.h>

endif

_MSC_VER is undefined in mingw on windows but sys/socket.h is unavailable.

Environment

Minimal test code / Steps to reproduce the issue

  1. build using mingw64 and libzmq version 4.3.4 (4.3.2 works)

What's the actual result? (include assertion message & call stack if applicable)

fails to build as sys/socket.h is not available

What's the expected result?

succesful build

0x0badc0de commented 2 years ago

Had the same issue, seems to be caused by ming64 runtime 10 providing afunix.h so ZMQ's build system has ZMQ_HAVE_IPC enabled. Forced it to 0 and was able to build.