Source: util-linux
Version: 2.39.2-5
Severity: important
Tags: patch
User: debian-h...@lists.debian.org
Usertags: hurd
X-Debbugs-CC: debian-h...@lists.debian.org

Hi,

util-linux FTBFS on hurd-i386 (built in the past, last successful build was
2.39.1-4).

A patch enabling a successful build is attached:
libmount_src_hooks.c.diff where mnt_context_is_fake()
is defined only if USE_LIBMOUNT_MOUNTFD_SUPPORT is defined. And
USE_LIBMOUNT_MOUNTFD_SUPPORT is only defined on GNU/Linux systems.

Alternately #ifdef __linux__ instead of #ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
could be used as condition. Maybe that would be a better solution.

Configure reports:
configure: WARNING: non-linux system; not building libmount_mountfd_support,
among in total 47 warnings for not building on a non-linux system.

Thanks!




--- a/libmount/src/hooks.c	2023-08-17 09:56:12.000000000 +0200
+++ b/libmount/src/hooks.c	2023-11-11 19:29:01.000000000 +0100
@@ -315,11 +315,14 @@
 {
 	int rc = 0;
 
+#ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
 	if (mnt_context_is_fake(cxt))
 		DBG(CXT, ul_debugobj(cxt, " FAKE call"));
 	else
 		rc = hook->func(cxt, hook->hookset, hook->data);
-
+#else
+		rc = hook->func(cxt, hook->hookset, hook->data);
+#endif
 	hook->executed = 1;
 	if (!rc)
 		rc = call_depend_hooks(cxt, hook->hookset->name, hook->stage);
@@ -364,10 +367,14 @@
 
 		DBG(CXT, ul_debugobj(cxt, "calling %s [first]", hs->name));
 
+#ifdef USE_LIBMOUNT_MOUNTFD_SUPPORT
 		if (mnt_context_is_fake(cxt))
 			DBG(CXT, ul_debugobj(cxt, " FAKE call"));
 		else
 			rc = hs->firstcall(cxt, hs, NULL);
+#else
+			rc = hs->firstcall(cxt, hs, NULL);
+#endif
 		if (!rc)
 			rc = call_depend_hooks(cxt, hs->name, stage);
 		if (rc < 0)

Reply via email to