* Fix non-Linux build
@ 2023-09-17 16:36 Samuel Thibault
2023-09-18 11:11 ` Karel Zak
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2023-09-17 16:36 UTC (permalink / raw)
To: Karel Zak, util-linux
[-- Attachment #1: Type: text/plain, Size: 57 bytes --]
Hello,
Here are some fixes for non-linux build.
Samuel
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 888 bytes --]
diff --git a/configure.ac b/configure.ac
index 5f609dec7..061e22e15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/libmount/src/hooks.c b/libmount/src/hooks.c
index dcfe69fa4..39d9d1337 100644
--- a/libmount/src/hooks.c
+++ b/libmount/src/hooks.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: Fix non-Linux build
2023-09-17 16:36 Fix non-Linux build Samuel Thibault
@ 2023-09-18 11:11 ` Karel Zak
2023-09-18 11:25 ` Samuel Thibault
0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2023-09-18 11:11 UTC (permalink / raw)
To: Samuel Thibault, util-linux
On Sun, Sep 17, 2023 at 06:36:31PM +0200, Samuel Thibault wrote:
> Here are some fixes for non-linux build.
Thanks!
> diff --git a/configure.ac b/configure.ac
> index 5f609dec7..061e22e15 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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.
> --- a/libmount/src/hooks.c
> +++ b/libmount/src/hooks.c
> @@ -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
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Fix non-Linux build
2023-09-18 11:11 ` Karel Zak
@ 2023-09-18 11:25 ` Samuel Thibault
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2023-09-18 11:25 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Karel Zak, le lun. 18 sept. 2023 13:11:09 +0200, a ecrit:
> On Sun, Sep 17, 2023 at 06:36:31PM +0200, Samuel Thibault wrote:
> > --- a/libmount/src/hooks.c
> > +++ b/libmount/src/hooks.c
> > @@ -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:-).
That works, thanks!
Samuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-18 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-17 16:36 Fix non-Linux build Samuel Thibault
2023-09-18 11:11 ` Karel Zak
2023-09-18 11:25 ` Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox