[LTP] [PATCH] configure.ac: Add _GNU_SOURCE for struct fs_quota_statv check
Li Wang
liwang@redhat.com
Mon Jun 17 07:34:36 CEST 2024
These changes help ensure that the necessary features and definitions
are available during the configuration process, preventing potential
issues related to missing or incompatible definitions. This should
resolve the compilation error related to struct fs_quota_statv:
/usr/include/xfs/xqm.h:167:8: error: redefinition of ‘struct fs_qfilestatv’
Signed-off-by: Li Wang <liwang@redhat.com>
---
configure.ac | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 85c5739c4..82969b8d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,7 +181,11 @@ AC_CHECK_TYPES([struct file_handle],,,[
#include <fcntl.h>
])
-AC_CHECK_TYPES([struct fs_quota_statv],,,[#include <xfs/xqm.h>])
+AC_CHECK_TYPES([struct fs_quota_statv],,,[
+#define _GNU_SOURCE
+#include <xfs/xqm.h>
+])
+
AC_CHECK_TYPES([struct if_nextdqblk],,,[#include <linux/quota.h>])
AC_CHECK_TYPES([struct iovec],,,[#include <sys/uio.h>])
AC_CHECK_TYPES([struct ipc64_perm],,,[#include <sys/ipcbuf.h>])
--
2.45.2
More information about the ltp
mailing list