Merge pull request #10281 from yuwata/follow-up-10277

meson: add more compile tests
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-10-08 18:42:47 +02:00
committed by GitHub
3 changed files with 26 additions and 17 deletions
+18 -15
View File
@@ -17,20 +17,23 @@ _systemd_headers = '''
# https://github.com/mesonbuild/meson/issues/1633
systemd_headers = files(_systemd_headers)
# sd-dhcp6-client.h
# sd-dhcp6-lease.h
# sd-dhcp-client.h
# sd-dhcp-lease.h
# sd-dhcp-server.h
# sd-ipv4acd.h
# sd-ipv4ll.h
# sd-lldp.h
# sd-ndisc.h
# sd-netlink.h
# sd-network.h
# sd-path.h
# sd-resolve.h
# sd-utf8.h
_not_installed_headers = '''
sd-dhcp6-client.h
sd-dhcp6-lease.h
sd-dhcp-client.h
sd-dhcp-lease.h
sd-dhcp-server.h
sd-ipv4acd.h
sd-ipv4ll.h
sd-lldp.h
sd-ndisc.h
sd-netlink.h
sd-network.h
sd-path.h
sd-radv.h
sd-resolve.h
sd-utf8.h
'''.split()
install_headers(
systemd_headers,
@@ -62,7 +65,7 @@ if cxx.found()
endif
endif
foreach header : _systemd_headers
foreach header : _systemd_headers + _not_installed_headers
foreach opt : opts
name = ''.join([header, ':'] + opt)
if want_tests != 'false'
+3 -2
View File
@@ -18,10 +18,11 @@
***/
#include <inttypes.h>
#include <linux/neighbour.h>
#include <linux/rtnetlink.h>
#include <net/ethernet.h>
#include <netinet/ether.h>
#include <netinet/in.h>
#include <linux/rtnetlink.h>
#include <linux/neighbour.h>
#include "sd-event.h"
+5
View File
@@ -17,6 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
/* 'struct addrinfo' needs _GNU_SOURCE */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <inttypes.h>
#include <netdb.h>
#include <sys/socket.h>