dhcpcd-discuss

Re: compile error dhcpcd 6.3.2

Roy Marples

Thu Apr 17 10:47:44 2014

On 17/04/2014 11:30, Olaf Westrik wrote:
On 2014-04-17 12:07, Roy Marples wrote:

_BSD_SOURCE is defined so that the BSD UDP header definitons are used.
Can you try adding this line in the include section at the top of
dhcpcd.c please?

#include <fcntl.h>

That does not make a difference.

Only after adding -D_GNU_SOURCE (for example in config.mk) __USE_GNU
is defined via features.h and O_CLOEXEC is defined.

Adding _GNU_SOURCE results in another problem though:
cc  -Os -march=i486 -mtune=pentium -pipe -fomit-frame-pointer -Wall
-Wextra -std=c99 -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
-DINET -DINET6 -DPLUGIN_DEV -I./crypt -c dhcpcd.c -o dhcpcd.o
In file included from ipv6.h:39,
                 from net.h:41,
                 from dhcp.h:247,
                 from dhcp6.h:100,
                 from dhcpcd.c:59:
/usr/include/linux/ipv6.h:19: error: redefinition of 'struct in6_pktinfo' /usr/include/linux/ipv6.h:24: error: redefinition of 'struct ip6_mtuinfo'
make: *** [dhcpcd.o] Error 1

Sounds like you need to update your libc headers.
From the man page [1] you need to update to glibc-2.12

Is this possible?

Roy

[1] http://man7.org/linux/man-pages/man2/open.2.html

References:
compile error dhcpcd 6.3.2Olaf Westrik
Re: compile error dhcpcd 6.3.2Roy Marples
Re: compile error dhcpcd 6.3.2Olaf Westrik
Archive administrator: postmaster@marples.name