From 84e19ba0671b6d2a1740f14bc033ea9bcdc188e1 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 1 Nov 2019 15:20:27 +0100 Subject: libfshelp: do not define extern inlines when not requested * libfshelp/fshelp.h (fshelp_rlock_init, fshelp_rlock_po_init) [!__USE_EXTERN_INLINES && !DISKFS_DEFINE_EXTERN_INLINE]: Do not define. --- libfshelp/fshelp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h index b2c5eb5d..3961a701 100644 --- a/libfshelp/fshelp.h +++ b/libfshelp/fshelp.h @@ -254,6 +254,8 @@ struct rlock_box struct rlock_list *locks; /* List of locks on the file. */ }; +#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) + /* Initialize the rlock_box BOX. */ FSHELP_EXTERN_INLINE error_t fshelp_rlock_init (struct rlock_box *box) @@ -262,6 +264,8 @@ error_t fshelp_rlock_init (struct rlock_box *box) return 0; } +#endif /* Use extern inlines. */ + /* Unique to a peropen. */ struct rlock_peropen { @@ -272,6 +276,8 @@ struct rlock_peropen struct rlock_list **locks; }; +#if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE) + FSHELP_EXTERN_INLINE error_t fshelp_rlock_po_init (struct rlock_peropen *po) { @@ -283,6 +289,8 @@ error_t fshelp_rlock_po_init (struct rlock_peropen *po) return 0; } +#endif /* Use extern inlines. */ + /* Release all of the locks held by a given peropen. */ error_t fshelp_rlock_drop_peropen (struct rlock_peropen *po); -- cgit v1.2.3