On 26/12/23 11:22 pm, Darrick J. Wong wrote:
Ah, linux/ext4.h didn't exist until 6.4. Heh. Well, in the long run
fstests really ought to pull in kernel ioctl definitions whenever
possible. So:
I suppose this program should #include <linux/types.h> to get the __u64
definition, after which this can go away:
-typedef unsigned long long __u64;
And then you'd need to add some m4/autoconf AC_CHECK_HEADERS magic for
configure to detect when #include <linux/ext4.h> actually results in a
compilable program; and set some make variable accordingly.
Then this program can grow a:
#ifdef HAVE_LINUX_EXT4_H
# include <linux/ext4.h>
#endif
After which this existing bit of cpp magic:
#ifndef EXT4_IOC_RESIZE_FS
# define EXT4_IOC_RESIZE_FS _IOW('f', 16, __u64)
#endif
should work for everyone.
--D
Sure, will address the changes in v2.
Thanks