meson: fix link_addr(3) check

Add missing prerequisite headers for checking link_addr(3)
in net/if_dl.h.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Roman Bogorodskiy 2020-08-08 13:16:16 +04:00
parent 3ef2af8ed3
commit f7ccff027e

View File

@ -770,7 +770,7 @@ symbols = [
[ 'linux/if_vlan.h', 'GET_VLAN_VID_CMD' ], [ 'linux/if_vlan.h', 'GET_VLAN_VID_CMD' ],
# Check for BSD approach for setting MAC addr # Check for BSD approach for setting MAC addr
[ 'net/if_dl.h', 'link_addr' ], [ 'net/if_dl.h', 'link_addr', '#include <sys/types.h>\n#include <sys/socket.h>' ],
] ]
if host_machine.system() == 'linux' if host_machine.system() == 'linux'
@ -791,7 +791,7 @@ if host_machine.system() == 'linux'
endif endif
foreach symbol : symbols foreach symbol : symbols
if cc.has_header_symbol(symbol[0], symbol[1], args: '-D_GNU_SOURCE') if cc.has_header_symbol(symbol[0], symbol[1], args: '-D_GNU_SOURCE', prefix: symbol.get(2, ''))
conf.set('HAVE_DECL_@0@'.format(symbol[1].to_upper()), 1) conf.set('HAVE_DECL_@0@'.format(symbol[1].to_upper()), 1)
endif endif
endforeach endforeach