From 91a156fb59a8d4b9eadbf9b2ba0e9985b49f62fb Mon Sep 17 00:00:00 2001 From: Nakidai Date: Fri, 29 Nov 2024 10:43:44 +0300 Subject: Add include guards for config.h --- configure | 9 +++++++-- include/config.h | 6 ++++++ 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 -- cgit 1.4.1