Whamcloud - gitweb
LU-13274 uapi: make lustre UAPI headers C99 compliant 73/37973/2
authorJames Simmons <jsimmons@infradead.org>
Sat, 29 Feb 2020 01:49:42 +0000 (20:49 -0500)
committerOleg Drokin <green@whamcloud.com>
Mon, 6 Apr 2020 21:15:18 +0000 (21:15 +0000)
commit0417dce9fc75ad8368b6a60fb8dd9556254e2741
tree00cbfd630edd1c68fc5418d6b09b60bb6bff4e25
parentdc88cb0843e57be3930558e4e1b5c9b5d3af3311
LU-13274 uapi: make lustre UAPI headers C99 compliant

Attempting to compile strict C99 user land applications or
libraries with the Lustre UAPI headers will fail. These same
errors can be seen by enabling CONFIG_UAPI_HEADER_TEST as well.
Update the Lustre UAPI headers to be compilable with -std=c99.
Enhance our current test covering UAPI header handling.

For OpenSFS branch we can't include <linux/stat.h> since we support
kernels before struct statx existed and they will collide with the
special definitions in lustre_user.h.

Lustre-change: https://review.whamcloud.com/37678
Lustre-commit: 7a7309fa849577ddd5a4f6bb5bfb69e84a7fec89

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Change-Id: Ifb0da33180dc3c7e116d6bf2b7f603ad0528277a
Reviewed-on: https://review.whamcloud.com/37973
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
13 files changed:
config/lustre-build.m4
lustre/include/lustre/lustreapi.h
lustre/include/uapi/linux/lustre/lustre_barrier_user.h
lustre/include/uapi/linux/lustre/lustre_cfg.h
lustre/include/uapi/linux/lustre/lustre_fid.h
lustre/include/uapi/linux/lustre/lustre_fiemap.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/include/uapi/linux/lustre/lustre_ioctl.h
lustre/include/uapi/linux/lustre/lustre_lfsck_user.h
lustre/include/uapi/linux/lustre/lustre_log_user.h
lustre/include/uapi/linux/lustre/lustre_ostid.h
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/tests/sanity.sh