Skip to content

Commit 877d53c

Browse files
committed
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 parent 88fe057 commit 877d53c

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎tools/testing/selftests/networking/timestamping/timestamping.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <asm/types.h>
3333
#include <linux/net_tstamp.h>
3434
#include <linux/errqueue.h>
35+
#include <linux/sockios.h>
3536

3637
#ifndef SO_TIMESTAMPING
3738
# define SO_TIMESTAMPING 37
@@ -42,14 +43,6 @@
4243
# define SO_TIMESTAMPNS 35
4344
#endif
4445

45-
#ifndef SIOCGSTAMPNS
46-
# define SIOCGSTAMPNS 0x8907
47-
#endif
48-
49-
#ifndef SIOCSHWTSTAMP
50-
# define SIOCSHWTSTAMP 0x89b0
51-
#endif
52-
5346
static void usage(const char *error)
5447
{
5548
if (error)

0 commit comments

Comments
 (0)