axboe / fio

Flexible I/O Tester
GNU General Public License v2.0
5.21k stars 1.26k forks source link

Aix - make statx #1765

Open maartenv86 opened 4 months ago

maartenv86 commented 4 months ago

Please acknowledge the following before creating a ticket

Description of the bug: make halts wit the following:

In file included from engines/fileoperations.c:16: engines/../oslib/statx.h:12:5: error: conflicting types for 'statx' 12 | int statx(int dfd, const char pathname, int flags, unsigned int mask, | ^~~~~ In file included from /usr/include/sys/lockf.h:45, from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/include-fixed/unistd.h:868, from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/10/include-fixed/fcntl.h:254, from engines/fileoperations.c:9: /usr/include/sys/stat.h:512:5: note: previous declaration of 'statx' was here 512 | int statx(char , struct stat *, int, int); | ^~~~~ make: *** [Makefile:526: engines/fileoperations.o] Error 1

Environment: AIX 7.2 TL05 SP04

fio version: 3.37

Reproduction steps ./configure <-- without any errors make <-- halts with above output.

vincentkfu commented 4 months ago

It looks like AIX has a different definition of statx() than Linux does. We need to detect this in configure and make things work.

AIX statx: https://www.ibm.com/docs/en/aix/7.3?topic=s-stat-fstat-lstat-statx-fstatx-statxat-fstatat-fullstat-ffullstat-stat64-fstat64-lstat64-stat64x-fstat64x-lstat64x-stat64xat-subroutine