summary refs log tree commit diff
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-12-22 14:51:33 +0300
committerNakidai <nakidai@disroot.org>2024-12-22 14:51:33 +0300
commitb4c8fdbe773fe2a8cf921415f40043acefa26b5d (patch)
tree1cddc0c9caf28601ba9747275d65b0924f569275
parent6d6450e13c31f085077da61c84eafdfd70348d52 (diff)
downloadlibhttpc-b4c8fdbe773fe2a8cf921415f40043acefa26b5d.tar.gz
libhttpc-b4c8fdbe773fe2a8cf921415f40043acefa26b5d.zip
Fix NOSOCK HEAD v1.1.1 master
Code was including socket-related headers even with NOSOCK
-rw-r--r--src/request.c2
-rw-r--r--src/response.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/request.c b/src/request.c
index 93d2421..3536778 100644
--- a/src/request.c
+++ b/src/request.c
@@ -4,8 +4,10 @@
 #include <stddef.h>
 #include <string.h>
 
+#ifdef LibHTTPC_SOCK
 #include <sys/socket.h>
 #include <sys/types.h>
+#endif
 
 
 struct LibHTTPC_Request *LibHTTPC_loadRequest(struct LibHTTPC_Request *request_buf, char *buf)
diff --git a/src/response.c b/src/response.c
index d2442ff..7964b72 100644
--- a/src/response.c
+++ b/src/response.c
@@ -5,7 +5,9 @@
 #include <stdio.h>
 #include <string.h>
 
+#ifdef LibHTTPC_SOCK
 #include <sys/socket.h>
+#endif
 
 
 #define WRITE()                                             \