diff options
author | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2014-07-02 15:52:52 +0000 |
---|---|---|
committer | t00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7> | 2014-07-02 15:52:52 +0000 |
commit | e6e18333da18c5bb7de7e9189e53403e2ffa7023 (patch) | |
tree | e44213c06aa2801acffafafef538021815559979 | |
parent | 03b9c0e3f35b2301d0c462a8a0f9f43f3ccd6d93 (diff) | |
download | usrsctplib-e6e18333da18c5bb7de7e9189e53403e2ffa7023.tar.gz |
Fix
https://code.google.com/p/sctp-refimpl/issues/detail?id=5
Thanks to Ehsan Akhgari for reporting and providing a fix.
git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8912 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-x | netinet/sctp_os_userspace.h | 10 | ||||
-rwxr-xr-x | user_malloc.h | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/netinet/sctp_os_userspace.h b/netinet/sctp_os_userspace.h index 8840d08..eca3e18 100755 --- a/netinet/sctp_os_userspace.h +++ b/netinet/sctp_os_userspace.h @@ -217,11 +217,6 @@ typedef HANDLE userland_thread_t; typedef char* caddr_t; -int Win_getifaddrs(struct ifaddrs**); -#define getifaddrs(interfaces) (int)Win_getifaddrs(interfaces) -int win_if_nametoindex(const char *); -#define if_nametoindex(x) win_if_nametoindex(x) - #define bzero(buf, len) memset(buf, 0, len) #define bcopy(srcKey, dstKey, len) memcpy(dstKey, srcKey, len) #define snprintf(data, size, format, ...) _snprintf_s(data, size, _TRUNCATE, format, __VA_ARGS__) @@ -399,6 +394,11 @@ struct udphdr { unsigned __int16 uh_sum; }; +int Win_getifaddrs(struct ifaddrs**); +#define getifaddrs(interfaces) (int)Win_getifaddrs(interfaces) +int win_if_nametoindex(const char *); +#define if_nametoindex(x) win_if_nametoindex(x) + #else /* !defined(Userspace_os_Windows) */ #include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */ #include <sys/socket.h> diff --git a/user_malloc.h b/user_malloc.h index 07187ee..4ea9548 100755 --- a/user_malloc.h +++ b/user_malloc.h @@ -41,7 +41,15 @@ #include <strings.h> #include <stdint.h> #else -#include "netinet/sctp_os_userspace.h" +#if defined(_MSC_VER) && _MSC_VER >= 1600 +#include <stdint.h> +#elif defined(SCTP_STDINT_INCLUDE) +#include SCTP_STDINT_INCLUDE +#else +#define uint32_t unsigned __int32 +#define uint64_t unsigned __int64 +#endif +#include <winsock2.h> #endif #define MINALLOCSIZE UMA_SMALLEST_UNIT |