]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
time: Add time_types.h
authorDeepa Dinamani <deepa.kernel@gmail.com>
Wed, 13 Feb 2019 03:26:03 +0000 (19:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Feb 2019 16:51:51 +0000 (11:51 -0500)
commitca5e9aba753ed15d173c7a7b88e4d402b7ca8121
tree9c3ec8ce052ad5059414a0b43a4d48e9f28855e1
parenta08ef41f71a94a0524dce8b848cb8869ef7cd8c1
time: Add time_types.h

sys/time.h is the mandated include for many time related
defines. However, linux/time.h overlaps sys/time.h
significantly and this makes including both from userspace
or one from the other impossible.

This also means that userspace can get away with including
sys/time.h whenever it needs linux/time.h and this is what's
been happening in the user world usually.

But, we have new data types that we plan to use in the uapi time
interfaces also defined in the linux/time.h. But, we are unable
to use these types when sys/time.h is included.

Hence, move the new types to a new header, time_types.h.
We intend to eventually have all the uapi defines that the kernel
uses defined in this header.
Note that the plan is to replace uapi interfaces with timeval to
use __kernel_old_timeval, timespec to use __kernel_old_timespec etc.

Reported-by: Ran Rozenstein <ranro@mellanox.com>
Fixes: 9718475e6908 ("socket: Add SO_TIMESTAMPING_NEW")
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/time.h
include/uapi/linux/time_types.h [new file with mode: 0644]