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>
This commit is contained in:
Shuah Khan 2019-06-27 16:39:35 -06:00
parent 88fe057d00
commit 877d53c295
1 changed files with 1 additions and 8 deletions

View File

@ -32,6 +32,7 @@
#include <asm/types.h>
#include <linux/net_tstamp.h>
#include <linux/errqueue.h>
#include <linux/sockios.h>
#ifndef SO_TIMESTAMPING
# define SO_TIMESTAMPING 37
@ -42,14 +43,6 @@
# define SO_TIMESTAMPNS 35
#endif
#ifndef SIOCGSTAMPNS
# define SIOCGSTAMPNS 0x8907
#endif
#ifndef SIOCSHWTSTAMP
# define SIOCSHWTSTAMP 0x89b0
#endif
static void usage(const char *error)
{
if (error)