Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@aquilenet.fr>
To: Karel Zak <kzak@redhat.com>, util-linux@vger.kernel.org
Subject: Fix non-Linux build
Date: Sun, 17 Sep 2023 18:36:31 +0200	[thread overview]
Message-ID: <20230917163631.xcmdnwodz4wrcpyq@begin> (raw)

[-- 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;

             reply	other threads:[~2023-09-17 16:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17 16:36 Samuel Thibault [this message]
2023-09-18 11:11 ` Fix non-Linux build Karel Zak
2023-09-18 11:25   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230917163631.xcmdnwodz4wrcpyq@begin \
    --to=samuel.thibault@aquilenet.fr \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).