From: Roy Marples Date: Thu, 12 Sep 2013 17:08:34 +0000 (+0000) Subject: Fix building with a dev manager X-Git-Tag: v6.1.0~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52dc01927b0d04bcde2ea636fe8517d5f593341d;p=thirdparty%2Fdhcpcd.git Fix building with a dev manager --- diff --git a/Makefile b/Makefile index 31da4f16..b619be28 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ SRCS+= dhcp-common.c CFLAGS?= -O2 CSTD?= c99 +MKDIRS= include config.mk CFLAGS+= -std=${CSTD} @@ -27,7 +28,7 @@ CLEANFILES+= .depend FILES= dhcpcd.conf FILESDIR= ${SYSCONFDIR} -SUBDIRS= dhcpcd-hooks dev +SUBDIRS= dhcpcd-hooks ${MKDIRS} SED_DBDIR= -e 's:@DBDIR@:${DBDIR}:g' SED_LIBDIR= -e 's:@LIBDIR@:${LIBDIR}:g' diff --git a/configure b/configure index 37090bb1..975ab3c6 100755 --- a/configure +++ b/configure @@ -607,10 +607,9 @@ if [ "$DEV" != no -a "$UDEV" != no ]; then printf "Checking for libudev ... " LIBUDEV_CFLAGS=$(pkg-config --cflags libudev 2>/dev/null) LIBUDEV_LIBS=$(pkg-config --libs libudev 2>/dev/null) - [ -z "$DEV" ] && DEV=yes fi if [ "$DEV" != no -a "$UDEV" != no -a -n "$LIBUDEV_LIBS" ]; then - echo "yes" + [ -z "$DEV" ] && DEV=yes echo "DEV_PLUGINS+= udev" >>$CONFIG_MK if [ -n "$LIBUDEV_CFLAGS" ]; then echo "LIBUDEV_CFLAGS= $LIBUDEV_CFLAGS" >>$CONFIG_MK @@ -641,7 +640,8 @@ fi if [ "$DEV" = yes ]; then echo "SRCS+= dev.c" >>$CONFIG_MK echo "CPPFLAGS+= -DPLUGIN_DEV" >>$CONFIG_MK - echo "LDFLAGS+= -Wl,--export-dynamic" >>$CONFIG_MK + echo "LDFLAGS+= -Wl,--export-dynamic" >>$CONFIG_MK + echo "MKDIRS+= dev" fi if [ -z "$SERVICECMD" ]; then diff --git a/dev.h b/dev.h index 0db2fcfa..bea3117b 100644 --- a/dev.h +++ b/dev.h @@ -46,8 +46,8 @@ void dev_stop(void); #else #define dev_initialized(a) 1 #define dev_listening() 0 -#define dev_start(a) -#define dev_stop() +#define dev_start(a) {} +#define dev_stop() {} #endif #endif