From ac06193300aea17d6e6d1ad784585542815af94b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 7 Mar 2020 16:04:27 +0100 Subject: [PATCH] services: Support compilation on the Hurd. * modules/shepherd/system.scm.in (prctl): Catch compile-time error. --- modules/shepherd/system.scm.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/shepherd/system.scm.in b/modules/shepherd/system.scm.in index 769404a..7def22d 100644 --- a/modules/shepherd/system.scm.in +++ b/modules/shepherd/system.scm.in @@ -1,6 +1,7 @@ ;; system.scm -- Low-level operating system interface. ;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès ;; Copyright (C) 2018 Carlo Zancanaro +;; Copyright (C) 2020 Jan (janneke) Nieuwenhuizen ;; ;; This file is part of the GNU Shepherd. ;; @@ -145,7 +146,9 @@ ctrlaltdel(8) and see kernel/reboot.c in Linux." (define PR_SET_CHILD_SUBREAPER @PR_SET_CHILD_SUBREAPER@) (define prctl - (if (dynamic-func "prctl" (dynamic-link)) + (if (catch #t + (lambda _ (dynamic-func "prctl" (dynamic-link))) + (const #f)) (let ((proc (syscall->procedure long "prctl" (list int int)))) (lambda (process operation) "Perform an operation on the given process" -- 2.24.0