dhcpcd-discuss

Re: Build dhcpcd with error ‘IFA_FLAGS’ undeclared

Roy Marples

Thu Aug 01 12:55:51 2019

On 01/08/2019 13:00, urv wrote:

On 8/1/19 11:57 AM, Roy Marples wrote:
Hi Roman

On 01/08/2019 08:34, urv wrote:

Hello, Roy!

Build dhcpcd v.8.0 and newer on quite old kernel 3.10 finish with error:

if-linux.c: In function ‘if_address’:
if-linux.c:1511:38: error: ‘IFA_FLAGS’ undeclared (first use in this function)
    add_attr_32(&nlm.hdr, sizeof(nlm), IFA_FLAGS, flags);
                                       ^~~~~~~~~
if-linux.c:1511:38: note: each undeclared identifier is reported only once for each function it appears in
if-linux.c: In function ‘if_address6’:
if-linux.c:1585:38: error: ‘IFA_FLAGS’ undeclared (first use in this function)
    add_attr_32(&nlm.hdr, sizeof(nlm), IFA_FLAGS, flags);
                                       ^~~~~~~~~

Problem appear with commit "d1468fbdad0e288b23c9e5181d1de4476691ae61"
And yes, header file "linux/if_addr.h" doesn't have declaration of 'IFA_FLAGS'

What I want for Christmas is for linux headers to use #defines.
Sadly this patch will have to do. Does it fix your compile issue?

Roy

It works, really! Shall we see the patch in master branch?


References:
Build dhcpcd with error ‘IFA_FLAGS’ undeclaredurv
Re: Build dhcpcd with error ‘IFA_FLAGS’ undeclaredRoy Marples
Re: Build dhcpcd with error ‘IFA_FLAGS’ undeclaredurv
Archive administrator: postmaster@marples.name