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
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')
-rw-r--r--sys-apps/iproute2/iproute2-4.4.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-4.5.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-4.6.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-4.7.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-4.8.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-4.9.0.ebuild8
-rw-r--r--sys-apps/iproute2/iproute2-9999.ebuild8
7 files changed, 28 insertions, 28 deletions
diff --git a/sys-apps/iproute2/iproute2-4.4.0.ebuild b/sys-apps/iproute2/iproute2-4.4.0.ebuild
index 1689227397e4..50d9b37d6a8e 100644
--- a/sys-apps/iproute2/iproute2-4.4.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.4.0.ebuild
@@ -69,10 +69,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
diff --git a/sys-apps/iproute2/iproute2-4.5.0.ebuild b/sys-apps/iproute2/iproute2-4.5.0.ebuild
index e916e8484161..d144f174a32f 100644
--- a/sys-apps/iproute2/iproute2-4.5.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.5.0.ebuild
@@ -69,10 +69,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
diff --git a/sys-apps/iproute2/iproute2-4.6.0.ebuild b/sys-apps/iproute2/iproute2-4.6.0.ebuild
index 9a1447daa5d8..f8ff844d8851 100644
--- a/sys-apps/iproute2/iproute2-4.6.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.6.0.ebuild
@@ -79,10 +79,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
diff --git a/sys-apps/iproute2/iproute2-4.7.0.ebuild b/sys-apps/iproute2/iproute2-4.7.0.ebuild
index 4b4f69e7fb3d..89523f671cfe 100644
--- a/sys-apps/iproute2/iproute2-4.7.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.7.0.ebuild
@@ -79,10 +79,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
diff --git a/sys-apps/iproute2/iproute2-4.8.0.ebuild b/sys-apps/iproute2/iproute2-4.8.0.ebuild
index 4b4f69e7fb3d..89523f671cfe 100644
--- a/sys-apps/iproute2/iproute2-4.8.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.8.0.ebuild
@@ -79,10 +79,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
diff --git a/sys-apps/iproute2/iproute2-4.9.0.ebuild b/sys-apps/iproute2/iproute2-4.9.0.ebuild
index e1d91593c5ad..d82b3ad8024f 100644
--- a/sys-apps/iproute2/iproute2-4.9.0.ebuild
+++ b/sys-apps/iproute2/iproute2-4.9.0.ebuild
@@ -78,10 +78,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
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