Fix non-Linux build
Hello,
Here are some fixes for non-linux build.
Samuel
configure.ac +2 -1
@@ -1906,7 +1906,8 @@ AS_IF([test "x$build_enosys" = xyes], [ ]) AM_CONDITIONAL([BUILD_ENOSYS], [test "x$build_enosys" = xyes]) -UL_BUILD_INIT([lsclocks], [yes]) +UL_BUILD_INIT([lsclocks], [check]) +UL_REQUIRES_LINUX([lsclocks]) AM_CONDITIONAL([BUILD_LSCLOCKS], [test "x$build_lsclocks" = xyes]) UL_BUILD_INIT([getopt], [yes])
libmount/src/hooks.c +2 -0
@@ -315,9 +315,11 @@ static int call_hook(struct libmnt_context *cxt, struct hookset_hook *hook) {int rc =0 ; +#if LINUX if (mnt_context_is_fake (cxt))DBG (CXT ,ul_debugobj (cxt," FAKE call" )); else +#endif rc = hook->func (cxt, hook->hookset, hook->data); hook->executed =1 ;
Quoted 1 line · Samuel Thibault
Here are some fixes for non-linux build.
Thanks!
configure.ac AS_IF([test "x$build_enosys" = xyes], [ · line 1911
Quoted 12 lines
configure.ac +2
-1@@ -1906,7 +1906,8 @@ AS_IF([test "x$build_enosys" = xyes], [ ]) AM_CONDITIONAL([BUILD_ENOSYS], [test "x$build_enosys" = xyes]) -UL_BUILD_INIT([lsclocks], [yes]) +UL_BUILD_INIT([lsclocks], [check]) +UL_REQUIRES_LINUX([lsclocks]) AM_CONDITIONAL([BUILD_LSCLOCKS], [test "x$build_lsclocks" = xyes])
Applied.
libmount/src/hooks.c static int call_hook(struct libmnt_context *cxt, struct hookset_hook *hook) · line 323
Quoted 12 lines
libmount/src/hooks.c +2
-0@@ -315,9 +315,11 @@ static int call_hook(struct libmnt_context *cxt, struct hookset_hook *hook) {int rc =0 ; +#if LINUX if (mnt_context_is_fake (cxt))DBG (CXT ,ul_debugobj (cxt," FAKE call" )); else +#endif rc = hook->func (cxt, hook->hookset, hook->data);
It seems better to not use libmount/src/hooks.c on non-Linux systems. Fixed (but not tested:-).
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Karel Zak, le lun. 18 sept. 2023 13:11:09 +0200, a ecrit:
Quoted 7 lines · Samuel Thibault
Quoted 6 lines
libmount/src/hooks.c +0
-0@@ -315,9 +315,11 @@ static int call_hook(struct libmnt_context *cxt, struct hookset_hook *hook) {int rc =0 ;
Quoted 9 lines
libmount/src/hooks.c static int call_hook(struct libmnt_context *cxt, struct hookset_hook *hook) · line 323
Quoted 6 lines
libmount/src/hooks.c +2
-0+#if LINUX if (mnt_context_is_fake (cxt))DBG (CXT ,ul_debugobj (cxt," FAKE call" )); else +#endif rc = hook->func (cxt, hook->hookset, hook->data);It seems better to not use
libmount/src/hooks.con non-Linux systems. Fixed (but not tested:-).
That works, thanks!
Samuel