diff options
author | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-03-26 12:02:23 +0100 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-03-31 11:35:33 +0200 |
commit | 3718e549ee31ac764b327bbf3d6e51dd7e224b46 (patch) | |
tree | 5bfc2147e348a5fd4b0291ad458dacf3feececc0 /hicn-light/src/hicn/core | |
parent | 4b36dc3d5dd3ec206aa24d49557c61ae5886be2b (diff) |
[HICN-581] update hicn stack to support windows, again
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Change-Id: Ic5cfeae600fde8140a076807fa1e411da1933a02
Diffstat (limited to 'hicn-light/src/hicn/core')
-rw-r--r-- | hicn-light/src/hicn/core/messageHandler.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/core/messageHandler.h b/hicn-light/src/hicn/core/messageHandler.h index 0bf6bebbe..a8b2a3e54 100644 --- a/hicn-light/src/hicn/core/messageHandler.h +++ b/hicn-light/src/hicn/core/messageHandler.h @@ -17,7 +17,9 @@ #define messageHandler #include <stdlib.h> +#ifndef _WIN32 #include <unistd.h> // close +#endif #include <hicn/hicn.h> #include <hicn/core/messagePacketType.h> @@ -195,7 +197,7 @@ _createRecvAddressPairFromPacket(const uint8_t *msgBuffer) { packetSrcAddr = addressCreateFromInet6(&addr_in6); /* We now determine the local address used to reach the packet src address */ - int sock = socket (AF_INET6, SOCK_DGRAM, 0); + int sock = (int)socket (AF_INET6, SOCK_DGRAM, 0); if (sock < 0) goto ERR; @@ -226,7 +228,7 @@ _createRecvAddressPairFromPacket(const uint8_t *msgBuffer) { /* We now determine the local address used to reach the packet src address */ - int sock = socket (AF_INET, SOCK_DGRAM, 0); + int sock = (int)socket (AF_INET, SOCK_DGRAM, 0); if (sock < 0) { perror("Socket error"); goto ERR; @@ -693,7 +695,7 @@ static inline void messageHandler_SetWldrNotification(uint8_t *notification, } static inline uint8_t * messageHandler_CreateProbePacket(hicn_format_t format, - uint32_t probe_lifetime){ + uint32_t probe_lifetime){ size_t header_length; hicn_packet_get_header_length_from_format(format, &header_length); |