summaryrefslogtreecommitdiff
path: root/src/basic/generate-arphrd-list.sh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-11 10:25:34 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-23 21:47:27 -0400
commit9cc0e6e99ca3645b87c22fecdaa9ba9965a12e4f (patch)
treed2983b55e3e36dd00095d1593b559a1effa9128d /src/basic/generate-arphrd-list.sh
parent3131bfe302d3d2657576499a86827ca979846b81 (diff)
downloadsystemd-9cc0e6e99ca3645b87c22fecdaa9ba9965a12e4f.tar.gz
meson: make cpp invocations cross-compilation friendly
This implementation assumes that the arguments in compiler.cmd_array() don't contain any spaces. Since we are only interested in compilation on Linux, I think this is a safe assumption. Solution suggested by Nirbheek Chauhan.
Diffstat (limited to 'src/basic/generate-arphrd-list.sh')
-rw-r--r--src/basic/generate-arphrd-list.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/generate-arphrd-list.sh b/src/basic/generate-arphrd-list.sh
index e4cd8ab6d2..9911f315fa 100644
--- a/src/basic/generate-arphrd-list.sh
+++ b/src/basic/generate-arphrd-list.sh
@@ -1,5 +1,5 @@
#!/bin/sh -e
-cpp -dM -include net/if_arp.h - </dev/null | \
+$1 -dM -include net/if_arp.h - </dev/null | \
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
sed -e 's/ARPHRD_//'