diff options
author | David Ahern <dsahern@gmail.com> | 2019-05-02 16:13:21 -0700 |
---|---|---|
committer | David Ahern <dsahern@gmail.com> | 2019-05-03 08:23:08 -0700 |
commit | 420b36a874b72bbe62feb2de903a705e7d177bd0 (patch) | |
tree | 896d1b914b756b88aafe22da81489dc4e1e8ebf4 | |
parent | 296b5de72423ea93bc62dcbc51c54fa096bd5ec7 (diff) | |
download | iproute2-420b36a874b72bbe62feb2de903a705e7d177bd0.tar.gz |
uapi: wrap SIOCGSTAMP and SIOCGSTAMPNS in ifndef
These warnings:
../include/uapi/linux/sockios.h:42:0: warning: "SIOCGSTAMP" redefined
../include/uapi/linux/sockios.h:43:0: warning: "SIOCGSTAMPNS" redefined
are from kernel commit 0768e17073dc5 ("net: socket: implement 64-bit
timestamps"). This commit moved the definitions of SIOCGSTAMP and
SIOCGSTAMPNS from include/asm-generic/sockios.h to
include/uapi/linux/sockios.h. Older OS'es already define them in
/usr/include/asm-generic/sockios.h resulting in ugly compile errors now:
In file included from ll_types.c:24:0:
../include/uapi/linux/sockios.h:42:0: warning: "SIOCGSTAMP" redefined
#define SIOCGSTAMP SIOCGSTAMP_OLD
In file included from /usr/include/x86_64-linux-gnu/asm/sockios.h:1:0,
from /usr/include/asm-generic/socket.h:5,
from /usr/include/x86_64-linux-gnu/asm/socket.h:1,
from /usr/include/x86_64-linux-gnu/bits/socket.h:368,
from /usr/include/x86_64-linux-gnu/sys/socket.h:38,
from ll_types.c:17:
/usr/include/asm-generic/sockios.h:11:0: note: this is the location of the previous definition
#define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */
so wrap them in #ifndef.
Signed-off-by: David Ahern <dsahern@gmail.com>
-rw-r--r-- | include/uapi/linux/sockios.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h index 7d1bccbb..35d7a60f 100644 --- a/include/uapi/linux/sockios.h +++ b/include/uapi/linux/sockios.h @@ -39,8 +39,12 @@ #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) /* on 64-bit and x32, avoid the ?: operator */ +#ifndef SIOCGSTAMP #define SIOCGSTAMP SIOCGSTAMP_OLD +#endif +#ifndef SIOCGSTAMPNS #define SIOCGSTAMPNS SIOCGSTAMPNS_OLD +#endif #else #define SIOCGSTAMP ((sizeof(struct timeval)) == 8 ? \ SIOCGSTAMP_OLD : SIOCGSTAMP_NEW) |