If -std=c99 is not included in the CFLAGS, it fails to build. Reproducible: Always Steps to Reproduce: 1. cd /tmp 2. tar xjf dhcpcd-5.99.7.tar.bz2 3. cd dhcpcd-5.99.7 4. CFLAGS="-O2 -pipe" ./configure 5. gmake Actual Results: # CFLAGS="-O2 -pipe" ./configure Configuring dhcpcd for ... freebsd Looking for compiler ... gcc gcc (Gentoo 4.6.3 p1.11, pie-0.5.2) 4.6.3 Testing for getifaddrs ... yes Testing for arc4random ... yes Testing for closefrom ... yes Testing for getline ... yes Testing for strlcpy ... yes Testing for TAILQ_FOREACH_SAFE ... yes Testing for posix_spawn ... yes Testing for pollts ... no Testing for ppoll ... no Testing for pselect ... yes Checking for OpenRC ... yes Checking for ntpd ... not found Checking for ypind ... /usr/sbin/ypbind (50-ypbind) SYSCONFDIR = /etc SBINDIR = /sbin LIBDIR = /lib LIBEXECDIR = /libexec DBDIR = /var/db RUNDIR = /var/run MANDIR = /usr/share/man HOOKSCRIPTS = 50-ypbind # gmake gcc -O2 -pipe -DINET -DINET6 -c common.c -o common.o In file included from config.h:8:0, from common.h:34, from common.c:57: compat/pollts.h:36:64: error: conflicting types for 'restrict' compat/pollts.h:36:23: note: previous definition of 'restrict' was here compat/pollts.h:37:21: error: conflicting types for 'restrict' compat/pollts.h:36:64: note: previous definition of 'restrict' was here gmake: *** [common.o] Error 1 # CFLAGS="-O2 -pipe -std=c99" ./configure <snip> # gmake gcc -O2 -pipe -std=c99 -DINET -DINET6 -c common.c -o common.o gcc -O2 -pipe -std=c99 -DINET -DINET6 -c control.c -o control.o <snip> dhcpcd-run-hooks.8.in > dhcpcd-run-hooks.8 build to succeed.
Created attachment 351302 [details, diff] sample patch for dhcpcd-5.99.7-r1.ebuild
From README: > We now default to using -std=c99. So this is not FreeBSD specific problem. It may arise some issue even on Linux. Take a loot at Makefile > CFLAGS?= -O2 > CSTD?= c99 > CFLAGS+= -std=${CSTD} > include config.mk CFLAGS is overwritten by config.mk. IMHO adding "-std=${CSTD}" should go after including config.mk.
Fixed upstream here: http://roy.marples.name/cgi-bin/gitweb.cgi?p=dhcpcd.git;a=commitdiff;h=1bbb56e355805d61c9262b27e048aff2852d7d47
Fixed in dhcpcd-6.0.2
Dhcpcd-6.0.2 is in the tree.