]> git.proxmox.com Git - mirror_iproute2.git/commit
uapi: wrap SIOCGSTAMP and SIOCGSTAMPNS in ifndef
authorDavid Ahern <dsahern@gmail.com>
Thu, 2 May 2019 23:13:21 +0000 (16:13 -0700)
committerDavid Ahern <dsahern@gmail.com>
Fri, 3 May 2019 15:23:08 +0000 (08:23 -0700)
commit420b36a874b72bbe62feb2de903a705e7d177bd0
tree896d1b914b756b88aafe22da81489dc4e1e8ebf4
parent296b5de72423ea93bc62dcbc51c54fa096bd5ec7
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>
include/uapi/linux/sockios.h