]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
configure: guard config.h with #ifdef CONFIG_H
authorRoy Marples <roy@marples.name>
Wed, 8 Nov 2023 10:10:35 +0000 (10:10 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Nov 2023 10:10:35 +0000 (10:10 +0000)
Rename CONFIG_H guard in defs.h to DEFS_H
This avoids a redeclaration issue on DragonFly.

configure
src/defs.h

index 646ce80346c35ff64e0144ac43bad69ed5b1b07a..5237b0e2808e5e2c0fc6bcc4c2e268eb36fb1d49 100755 (executable)
--- a/configure
+++ b/configure
@@ -263,6 +263,10 @@ echo "Configuring dhcpcd for ... $OS"
 rm -f $CONFIG_H $CONFIG_MK
 echo "# $OS" >$CONFIG_MK
 echo "/* $OS */" >$CONFIG_H
+echo >>$CONFIG_H
+echo "#ifndef CONFIG_H">>$CONFIG_H
+echo "#define CONFIG_H">>$CONFIG_H
+echo >>$CONFIG_H
 
 : ${SYSCONFDIR:=$PREFIX/etc}
 : ${SBINDIR:=$PREFIX/sbin}
@@ -1918,6 +1922,9 @@ if ! $HOOKSET; then
        fi
 fi
 
+echo >>$CONFIG_H
+echo "#endif /*CONFIG_H*/">>$CONFIG_H
+
 find_hook()
 {
        for h in [0-9][0-9]"-$x" [0-9][0-9]"-$x.in" \
index df4d35112b214ceb27d69bb641a34b60b56f03fa..39d0ac1c5a67dce8b33c269adb83b307319f8289 100644 (file)
@@ -25,8 +25,8 @@
  * SUCH DAMAGE.
  */
 
-#ifndef CONFIG_H
-#define CONFIG_H
+#ifndef DEFS_H
+#define DEFS_H
 
 #define PACKAGE                        "dhcpcd"
 #define VERSION                        "10.0.4"