summary refs log tree commit diff
diff options
context:
space:
mode:
authorNakidai <nakidai@disroot.org>2024-11-29 10:43:44 +0300
committerNakidai <nakidai@disroot.org>2024-11-29 10:43:44 +0300
commit91a156fb59a8d4b9eadbf9b2ba0e9985b49f62fb (patch)
treeee5650ca241b715cba58c76729d742e82d85d776
parent36d9719c15894caf052344e80328a55cba983a85 (diff)
downloadlibhttpc-91a156fb59a8d4b9eadbf9b2ba0e9985b49f62fb.tar.gz
libhttpc-91a156fb59a8d4b9eadbf9b2ba0e9985b49f62fb.zip
Add include guards for config.h
-rwxr-xr-xconfigure9
-rw-r--r--include/config.h6
2 files changed, 13 insertions, 2 deletions
diff --git a/configure b/configure
index 0dc8210..e16fe42 100755
--- a/configure
+++ b/configure
@@ -37,7 +37,12 @@ echo "
 DESTDIR=$DESTDIR
 " > config.mk
 
-echo > include/config.h
+echo "#ifndef __LIBHTTPC_CONFIG_H__
+#define __LIBHTTPC_CONFIG_H__
+
+" > include/config.h
 if [ -z "$NOSOCK" ]; then
-    echo "#define LibHTTPC_SOCK" > include/config.h
+    echo "#define LibHTTPC_SOCK" >> include/config.h
 fi
+echo "
+#endif" >> include/config.h
diff --git a/include/config.h b/include/config.h
index ddbd399..91077a4 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1 +1,7 @@
+#ifndef __LIBHTTPC_CONFIG_H__
+#define __LIBHTTPC_CONFIG_H__
+
+
 #define LibHTTPC_SOCK
+
+#endif