Sockets in MinGW

后端 未结 7 1255
猫巷女王i
猫巷女王i 2020-12-30 23:26

I was just trying to build netcat in MSYS using MinGW and realized that MinGW never really ported all of the BSD socket stuff to Windows (eg sys/socket.h). I know you can u

相关标签:
7条回答
  • 2020-12-31 00:19

    BSD sys/socket.h is a POSIX header and the win32 API doesn't support it. MinGW headers are just a reimplementation of native win32 headers and don't offer additional POSIX compatibility.

    If you are looking for sys/socket.h support, try either GNU gnulib's sys/socket.h replacement or go with Cygwin, which provides a POSIX compatibility wrapper on Windows.

    0 讨论(0)
提交回复
热议问题