24 lines
952 B
Diff
24 lines
952 B
Diff
--- libnfs-libnfs-3.0.0/include/win32/win32_compat.h.orig 2016-10-09 20:23:11.000000000 +0200
|
|
+++ libnfs-libnfs-3.0.0/include/win32/win32_compat.h 2017-04-10 11:43:57.415457919 +0200
|
|
@@ -119,7 +119,9 @@
|
|
|
|
/* Wrapper macros to call misc. functions win32 is missing */
|
|
#define poll(x, y, z) win32_poll(x, y, z)
|
|
+#ifndef __MINGW32__
|
|
#define snprintf sprintf_s
|
|
+#endif
|
|
#define inet_pton(x,y,z) win32_inet_pton(x,y,z)
|
|
#define open(x, y, z) _open(x, y, z)
|
|
#ifndef lseek
|
|
--- libnfs-libnfs-3.0.0/win32/win32_compat.c.orig 2018-10-31 22:04:57.659912100 +0300
|
|
+++ libnfs-libnfs-3.0.0/win32/win32_compat.c 2018-10-31 22:05:03.128224900 +0300
|
|
@@ -58,7 +58,7 @@
|
|
#else
|
|
char *srcNonConst = (char *)malloc(strLen);
|
|
memset(srcNonConst, 0, strLen);
|
|
- strncpy(srcNonConst, src, strLen);
|
|
+ strncpy(srcNonConst, src, sizeof(srcNonConst) - 1);
|
|
#endif
|
|
|
|
if( WSAStringToAddress(srcNonConst,af,NULL,(LPSOCKADDR)&sa,&len) == 0 )
|