summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-12-17 19:12:23 -0500
committerMike Frysinger <vapier@gentoo.org>2016-12-17 19:13:43 -0500
commit655594736c943e5569b1aab633ec656b08f0af71 (patch)
tree4fc09a9371aa65dcfbcba974edb0bad79719721f /sys-apps/iproute2/iproute2-9999.ebuild
parentsys-apps/iproute2: drop old <4.4.0 versions (diff)
downloadgentoo-655594736c943e5569b1aab633ec656b08f0af71.tar.gz
gentoo-655594736c943e5569b1aab633ec656b08f0af71.tar.bz2
gentoo-655594736c943e5569b1aab633ec656b08f0af71.zip
sys-apps/iproute2: improve configure tests #602960
Diffstat (limited to 'sys-apps/iproute2/iproute2-9999.ebuild')
-rw-r--r--sys-apps/iproute2/iproute2-9999.ebuild8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-apps/iproute2/iproute2-9999.ebuild b/sys-apps/iproute2/iproute2-9999.ebuild
index 2e7af2b5505a..e9beb84bf045 100644
--- a/sys-apps/iproute2/iproute2-9999.ebuild
+++ b/sys-apps/iproute2/iproute2-9999.ebuild
@@ -70,10 +70,10 @@ src_configure() {
# This sure is ugly. Should probably move into toolchain-funcs at some point.
local setns
pushd "${T}" >/dev/null
- echo 'main(){return setns();};' > test.c
- ${CC} ${CFLAGS} ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
- echo 'main(){};' > test.c
- ${CC} ${CFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
+ printf '#include <sched.h>\nint main(){return setns(0, 0);}\n' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} -D_GNU_SOURCE ${LDFLAGS} test.c >&/dev/null && setns=y || setns=n
+ echo 'int main(){return 0;}' > test.c
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c -lresolv >&/dev/null || sed -i '/^LDLIBS/s:-lresolv::' "${S}"/Makefile
popd >/dev/null
cat <<-EOF > Config