Whamcloud - gitweb
LU-13274 uapi: make lustre UAPI headers C99 compliant 78/37678/6
authorJames Simmons <jsimmons@infradead.org>
Sat, 29 Feb 2020 01:49:42 +0000 (20:49 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 11 Mar 2020 02:19:24 +0000 (02:19 +0000)
commit7a7309fa849577ddd5a4f6bb5bfb69e84a7fec89
tree49d79b17895ed57607042e180bbdfc0a95b230be
parent5d92f0ff942ff93b2f294bda1688e18622fc88c0
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.

Change-Id: Ifb0da33180dc3c7e116d6bf2b7f603ad0528277a
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/37678
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Gian-Carlo DeFazio <defazio1@llnl.gov>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@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