* [PATCH net] selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc
@ 2020-03-18 18:53 Alan Maguire
2020-03-22 3:23 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alan Maguire @ 2020-03-18 18:53 UTC (permalink / raw)
To: davem, kuba, shuah, netdev
Cc: posk, linux-kselftest, linux-kernel, Alan Maguire
Many systems build/test up-to-date kernels with older libcs, and
an older glibc (2.17) lacks the definition of SOL_DCCP in
/usr/include/bits/socket.h (it was added in the 4.6 timeframe).
Adding the definition to the test program avoids a compilation
failure that gets in the way of building tools/testing/selftests/net.
The test itself will work once the definition is added; either
skipping due to DCCP not being configured in the kernel under test
or passing, so there are no other more up-to-date glibc dependencies
here it seems beyond that missing definition.
Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP")
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
tools/testing/selftests/net/reuseport_addr_any.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/net/reuseport_addr_any.c b/tools/testing/selftests/net/reuseport_addr_any.c
index c623393..b8475cb2 100644
--- a/tools/testing/selftests/net/reuseport_addr_any.c
+++ b/tools/testing/selftests/net/reuseport_addr_any.c
@@ -21,6 +21,10 @@
#include <sys/socket.h>
#include <unistd.h>
+#ifndef SOL_DCCP
+#define SOL_DCCP 269
+#endif
+
static const char *IP4_ADDR = "127.0.0.1";
static const char *IP6_ADDR = "::1";
static const char *IP4_MAPPED6 = "::ffff:127.0.0.1";
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc
2020-03-18 18:53 [PATCH net] selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc Alan Maguire
@ 2020-03-22 3:23 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-22 3:23 UTC (permalink / raw)
To: alan.maguire; +Cc: kuba, shuah, netdev, posk, linux-kselftest, linux-kernel
From: Alan Maguire <alan.maguire@oracle.com>
Date: Wed, 18 Mar 2020 18:53:21 +0000
> Many systems build/test up-to-date kernels with older libcs, and
> an older glibc (2.17) lacks the definition of SOL_DCCP in
> /usr/include/bits/socket.h (it was added in the 4.6 timeframe).
>
> Adding the definition to the test program avoids a compilation
> failure that gets in the way of building tools/testing/selftests/net.
> The test itself will work once the definition is added; either
> skipping due to DCCP not being configured in the kernel under test
> or passing, so there are no other more up-to-date glibc dependencies
> here it seems beyond that missing definition.
>
> Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP")
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-22 3:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 18:53 [PATCH net] selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc Alan Maguire
2020-03-22 3:23 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).