public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2 0/3] Build fix undefined struct file_handle
@ 2021-01-13  7:51 Petr Vorel
  2021-01-13  7:51 ` [LTP] [PATCH v2 1/3] lapi: Move struct file_handle into lapi/fcntl.h Petr Vorel
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Petr Vorel @ 2021-01-13  7:51 UTC (permalink / raw)
  To: ltp

Hi,

changes v1->v2:
* use autotools to detect struct file_handle

Kind regards,
Petr

diff --git configure.ac configure.ac
index 06be1c094..e44e25cc6 100644
--- configure.ac
+++ configure.ac
@@ -148,6 +148,12 @@ AC_CHECK_TYPES([struct acct_v3],,,[#include <sys/acct.h>])
 AC_CHECK_TYPES([struct af_alg_iv, struct sockaddr_alg],,,[# include <linux/if_alg.h>])
 AC_CHECK_TYPES([struct fanotify_event_info_fid, struct fanotify_event_info_header],,,[#include <sys/fanotify.h>])
 AC_CHECK_TYPES([struct file_dedupe_range],,,[#include <linux/fs.h>])
+
+AC_CHECK_TYPES([struct file_handle],,,[
+#define _GNU_SOURCE
+#include <fcntl.h>
+])
+
 AC_CHECK_TYPES([struct fs_quota_statv],,,[#include <xfs/xqm.h>])
 AC_CHECK_TYPES([struct if_nextdqblk],,,[#include <linux/quota.h>])
 AC_CHECK_TYPES([struct iovec],,,[#include <sys/uio.h>])
diff --git include/lapi/fcntl.h include/lapi/fcntl.h
index ab460beb3..e08970c4f 100644
--- include/lapi/fcntl.h
+++ include/lapi/fcntl.h
@@ -141,13 +141,13 @@
 # define MAX_HANDLE_SZ	128
 #endif
 
-#ifndef HAVE_NAME_TO_HANDLE_AT
+#ifndef HAVE_STRUCT_FILE_HANDLE
 struct file_handle {
 	unsigned int handle_bytes;
 	int handle_type;
 	/* File identifier.  */
 	unsigned char f_handle[0];
 };
-#endif /* HAVE_NAME_TO_HANDLE_AT */
+#endif /* HAVE_STRUCT_FILE_HANDLE */
 
 #endif /* __LAPI_FCNTL_H__ */

Petr Vorel (3):
  lapi: Move struct file_handle into lapi/fcntl.h
  fanotify: Fix build on undefined struct file_handle
  syscalls: Remove unused include <fcntl.h>

 configure.ac                                           |  6 ++++++
 include/lapi/fcntl.h                                   | 10 ++++++++++
 include/lapi/name_to_handle_at.h                       |  9 +--------
 testcases/kernel/syscalls/fanotify/fanotify.h          |  2 +-
 testcases/kernel/syscalls/fanotify/fanotify09.c        |  1 -
 testcases/kernel/syscalls/fanotify/fanotify13.c        |  1 -
 testcases/kernel/syscalls/fanotify/fanotify15.c        |  1 -
 testcases/kernel/syscalls/fanotify/fanotify16.c        |  1 -
 .../syscalls/name_to_handle_at/name_to_handle_at01.c   |  1 -
 .../syscalls/name_to_handle_at/name_to_handle_at02.c   |  1 -
 .../syscalls/open_by_handle_at/open_by_handle_at01.c   |  1 -
 .../syscalls/open_by_handle_at/open_by_handle_at02.c   |  1 -
 12 files changed, 18 insertions(+), 17 deletions(-)

-- 
2.29.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-01-13 10:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-13  7:51 [LTP] [PATCH v2 0/3] Build fix undefined struct file_handle Petr Vorel
2021-01-13  7:51 ` [LTP] [PATCH v2 1/3] lapi: Move struct file_handle into lapi/fcntl.h Petr Vorel
2021-01-13  8:19   ` Yang Xu
2021-01-13  8:36     ` Petr Vorel
2021-01-13  8:51       ` Yang Xu
2021-01-13  7:51 ` [LTP] [PATCH v2 2/3] fanotify: Fix build on undefined struct file_handle Petr Vorel
2021-01-13  7:51 ` [LTP] [PATCH v2 3/3] syscalls: Remove unused include <fcntl.h> Petr Vorel
2021-01-13  9:16   ` Xiao Yang
2021-01-13  9:20     ` Xiao Yang
2021-01-13 10:02       ` Petr Vorel
2021-01-13  9:54     ` Petr Vorel
2021-01-13  9:57 ` [LTP] [PATCH v2 0/3] Build fix undefined struct file_handle Cyril Hrubis
2021-01-13 10:11   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox