Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: timestamping: Fix SIOCGSTAMP undeclared build failure

Add missing linux/sockios.h include to fix the following SIOCGSTAMP
undeclared build error. In addition, remove the local defines for
SIOCGSTAMPNS and SIOCSHWTSTAMP and pick them up from linux/sockios.h.

timestamping.c:249:19: error: SIOCGSTAMP undeclared
if (ioctl(sock, SIOCGSTAMP, &tv))

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>

+1 -8
+1 -8
tools/testing/selftests/networking/timestamping/timestamping.c
··· 32 32 #include <asm/types.h> 33 33 #include <linux/net_tstamp.h> 34 34 #include <linux/errqueue.h> 35 + #include <linux/sockios.h> 35 36 36 37 #ifndef SO_TIMESTAMPING 37 38 # define SO_TIMESTAMPING 37 ··· 41 40 42 41 #ifndef SO_TIMESTAMPNS 43 42 # define SO_TIMESTAMPNS 35 44 - #endif 45 - 46 - #ifndef SIOCGSTAMPNS 47 - # define SIOCGSTAMPNS 0x8907 48 - #endif 49 - 50 - #ifndef SIOCSHWTSTAMP 51 - # define SIOCSHWTSTAMP 0x89b0 52 43 #endif 53 44 54 45 static void usage(const char *error)