[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] branch master updated: build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLO
From: |
Ludovic Courtès |
Subject: |
[shepherd] branch master updated: build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux systems. |
Date: |
Sun, 26 Nov 2023 17:08:24 -0500 |
This is an automated email from the git hooks/post-receive script.
civodul pushed a commit to branch master
in repository shepherd.
The following commit(s) were added to refs/heads/master by this push:
new f67acd8 build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux
systems.
f67acd8 is described below
commit f67acd8b374341b5eea1722b6220c44656e98c45
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sun Nov 26 22:36:54 2023 +0100
build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux systems.
Previously, (shepherd system) on GNU/Hurd would read:
(define SFD_CLOEXEC )
(define SFD_NONBLOCK )
The effect is that these two variables would be set to *unspecified*,
leading to a type error in the ‘logior’ call in (shepherd).
* configure.ac: Do not leave ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ unset.
* modules/shepherd/system.scm.in (SFD_CLOEXEC, SFD_NONBLOCK): Add
comment.
* NEWS: Update.
---
NEWS | 6 ++++++
configure.ac | 9 +++++++++
modules/shepherd/system.scm.in | 1 +
3 files changed, 16 insertions(+)
diff --git a/NEWS b/NEWS
index 67b2901..596ef9f 100644
--- a/NEWS
+++ b/NEWS
@@ -35,6 +35,12 @@ separate PID namespace, shepherd could end up waiting for
the termination of
what’s actually a Linux kernel thread, such as PID 2 (“kthreadd”). This
situation is now recognized and avoided.
+** Fix cross-compilation to non-Linux operating systems
+
+Since 0.10.2, when cross-compiling to systems such as GNU/Hurd, the value of
+‘SFD_CLOEXEC’ and ‘SFD_NONBLOCK’ in (shepherd system) would be left undefined,
+leading to a type error when starting shepherd. This is now fixed.
+
* Changes in 0.10.2
** ‘shepherd’ loads configuration file asynchronously
diff --git a/configure.ac b/configure.ac
index 0adf38f..abda869 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,15 @@ AC_COMPUTE_INT([SIG_UNBLOCK], [SIG_UNBLOCK], [#include
<sys/signal.h>])
AC_COMPUTE_INT([SIG_SETMASK], [SIG_SETMASK], [#include <sys/signal.h>])
AC_MSG_RESULT([done])
+dnl These constants are undefined on non-Linux systems; set them to zero
+dnl instead of the empty string.
+if test -z "$SFD_CLOEXEC"; then
+ SFD_CLOEXEC=0
+fi
+if test -z "$SFD_NONBLOCK"; then
+ SFD_NONBLOCK=0
+fi
+
SIZEOF_STRUCT_SIGNALFD_SIGINFO="$ac_cv_sizeof_struct_signalfd_siginfo"
SIZEOF_SIGSET_T="$ac_cv_sizeof_sigset_t"
AC_SUBST([SIZEOF_STRUCT_SIGNALFD_SIGINFO])
diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in
index 490e2d1..8cc816a 100644
--- a/modules/shepherd/system.scm.in
+++ b/modules/shepherd/system.scm.in
@@ -234,6 +234,7 @@ sigset pointer."
;; case on GNU/Hurd.
@SIZEOF_STRUCT_SIGNALFD_SIGINFO@)
+;; The following constants are set to zero on non-Linux systems.
(define SFD_CLOEXEC @SFD_CLOEXEC@)
(define SFD_NONBLOCK @SFD_NONBLOCK@)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [shepherd] branch master updated: build: Set ‘SFD_NONBLOCK’ and ‘SFD_CLOEXEC’ on non-Linux systems.,
Ludovic Courtès <=