dhcpcd: fix ipv6 related compile failure
PATCH 1/1 dhcpcd: fix ipv6 related compile failure
Add '-D_GNU_SOURCE' to gain missing struct in6_pktinfo definition.
Fixes [1]:
ipv6.h:211:41: error: invalid application of 'sizeof' to incomplete type 'struct in6_pktinfo'
unsigned char sndbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
^
ipv6.h:195:38: error: invalid application of 'sizeof' to incomplete type 'struct in6_pktinfo'
#define IP6BUFLEN (CMSG_SPACE(sizeof(struct in6_pktinfo)) + \
^ipv6.h:214:23: note: in expansion of macro 'IP6BUFLEN'
unsigned char rcvbuf[IP6BUFLEN];
[1] http://autobuild.buildroot.net/results/523/523858fb930e74fe28f24989ff0697693b5fdd67
--- package/dhcpcd/dhcpcd.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/dhcpcd/dhcpcd.mk +2 -2
@@ -20,8 +20,8 @@ endif define DHCPCD_CONFIGURE_CMDS (cd $(@D); \ - $(TARGET_CONFIGURE_OPTS) ./configure \ - --os=linux \ + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ + ./configure --os=linux \ $(DHCPCD_CONFIG_OPTS) ) endef
Signature · 1 line
2.1.4
PATCH 1/1 dhcpcd: fix ipv6 related compile failure
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Peter" == Peter Seiderer <[email protected]> writes:
Add '-D_GNU_SOURCE' to gain missing struct
in6_pktinfodefinition. Fixes [1]:ipv6.h:211:41: error: invalid application of 'sizeof' to incomplete type 'struct
in6_pktinfo'unsigned char sndbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))]; ^ ipv6.h:195:38: error: invalid application of 'sizeof' to incomplete type 'struct in6_pktinfo' #define IP6BUFLEN (CMSG_SPACE(sizeof(struct in6_pktinfo)) + \ ^
Quoted 4 lines
ipv6.h:214:23: note: in expansion of macro 'IP6BUFLEN'
unsigned char rcvbuf[IP6BUFLEN];[1] http://autobuild.buildroot.net/results/523/523858fb930e74fe28f24989ff0697693b5fdd67
Bernd sent a similar patch:
http://patchwork.ozlabs.org/patch/462596/
But this is imho nicer than patching the source, so I've applied this and marked that patch as superseed.
Thanks both!
Signature · 1 line
Bye, Peter Korsgaard