From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Wed, 19 Sep 2018 13:40:47 +0200 Subject: [LTP] [PATCH] statx: fix compile errors with glibc<2.28 In-Reply-To: References: <20180919044813.22875-1-liwang@redhat.com> <20180919074821.GB28540@rei> Message-ID: <20180919114046.GC28540@rei> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > > > glibc 2.28 has shipped with a wrapper for the statx() system call. > > > Currently the build is broken against it, because sys/stat.h suddenly > > > declares all the same types that lapi/stat.h does. Fix it by taking > > > the sys/stat.h ones if glibc>=2.28. > > > > > > include/lapi/stat.h:26:8: error: redefinition of ???struct > > statx_timestamp??? > > > include/lapi/stat.h:73:8: error: redefinition of ???struct statx??? > > > > What's wrong with the configure checks we do have? > > > > See m4/ltp-statx.m4: > > > > AC_CHECK_TYPES([struct statx],,,[[#include ]]) > > AC_CHECK_TYPES([struct statx_timestamp],,,[[#include ]]) > > > > That should check exactly if these structures are defined and export the > > HAVE_STRUCT_* macros? > > > Check the config.log somewhere there is a test program that failed the compilation that tests for the struct statx and struct statx_timestamp. -- Cyril Hrubis chrubis@suse.cz