summaryrefslogtreecommitdiffstats
path: root/hicn-light/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-light/src/utils')
-rw-r--r--hicn-light/src/utils/address.c5
-rw-r--r--hicn-light/src/utils/address.h4
-rw-r--r--hicn-light/src/utils/commands.h6
-rw-r--r--hicn-light/src/utils/utils.c8
4 files changed, 16 insertions, 7 deletions
diff --git a/hicn-light/src/utils/address.c b/hicn-light/src/utils/address.c
index 3f6fe2591..ee1167de0 100644
--- a/hicn-light/src/utils/address.c
+++ b/hicn-light/src/utils/address.c
@@ -13,12 +13,13 @@
* limitations under the License.
*/
+#ifndef _WIN32
#include <arpa/inet.h>
+#include <unistd.h>
+#endif
#include <errno.h>
#include <src/config.h>
#include <stdio.h>
-#include <strings.h>
-#include <unistd.h>
#include <src/utils/address.h>
diff --git a/hicn-light/src/utils/address.h b/hicn-light/src/utils/address.h
index a98d15084..d8b0efcab 100644
--- a/hicn-light/src/utils/address.h
+++ b/hicn-light/src/utils/address.h
@@ -33,9 +33,11 @@
#ifndef address_h
#define address_h
+#ifndef _WIN32
#include <netinet/in.h>
-#include <stdbool.h>
#include <sys/un.h>
+#endif
+#include <stdbool.h>
#include <parc/algol/parc_Buffer.h>
#include <parc/algol/parc_BufferComposer.h>
diff --git a/hicn-light/src/utils/commands.h b/hicn-light/src/utils/commands.h
index 2f8ebcbfe..e276d8dd2 100644
--- a/hicn-light/src/utils/commands.h
+++ b/hicn-light/src/utils/commands.h
@@ -23,10 +23,14 @@
#ifndef commands_h
#define commands_h
+#ifndef _WIN32
#include <netinet/in.h>
+#include <sys/socket.h>
+#endif
+#include <src/config.h>
+
#include <stdint.h>
#include <stdlib.h>
-#include <sys/socket.h>
typedef struct in6_addr ipv6_addr_t;
typedef uint32_t ipv4_addr_t;
diff --git a/hicn-light/src/utils/utils.c b/hicn-light/src/utils/utils.c
index a41478a4b..3ab837eeb 100644
--- a/hicn-light/src/utils/utils.c
+++ b/hicn-light/src/utils/utils.c
@@ -1,17 +1,19 @@
// Utility function for commands
-#include <ctype.h>
+#ifndef _WIN32
#include <netinet/in.h>
-#include <pthread.h>
+#endif
+
+#include <ctype.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
#include <parc/algol/parc_Memory.h>
#include <parc/algol/parc_Network.h>
#include <parc/assert/parc_Assert.h>
+#include <pthread.h>
#include <src/utils/utils.h>
// This is the unique sequence number used by all messages and its thread locks