From: Roy Marples Date: Wed, 8 Nov 2023 10:10:35 +0000 (+0000) Subject: configure: guard config.h with #ifdef CONFIG_H X-Git-Tag: v10.0.5~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2913df520ae8ceac46bbd6bfa958cbccb0e476bf;p=thirdparty%2Fdhcpcd.git configure: guard config.h with #ifdef CONFIG_H Rename CONFIG_H guard in defs.h to DEFS_H This avoids a redeclaration issue on DragonFly. --- diff --git a/configure b/configure index 646ce803..5237b0e2 100755 --- 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" \ diff --git a/src/defs.h b/src/defs.h index df4d3511..39d0ac1c 100644 --- a/src/defs.h +++ b/src/defs.h @@ -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"