فهرست منبع

Workaround for missing definition of ENOTSUP on Win32

The ENOTSUP error code is not defined on Win32. However we can simply
use an equivalent from the Windows Socket API (WSA). Fixes Win32 build
with recent versions of libmodbus.
Tobias Doerffel 14 سال پیش
والد
کامیت
876a8d0d83
1فایلهای تغییر یافته به همراه2 افزوده شده و 0 حذف شده
  1. 2 0
      src/modbus-rtu-private.h

+ 2 - 0
src/modbus-rtu-private.h

@@ -38,6 +38,8 @@
 #define _MODBUS_RTU_CHECKSUM_LENGTH    2
 
 #if defined(_WIN32)
+#define ENOTSUP WSAEOPNOTSUPP
+
 /* WIN32: struct containing serial handle and a receive buffer */
 #define PY_BUF_SIZE 512
 struct win32_ser {