diff mbox series

[bug#62307,core-updates,v2,16/20] gnu: linux-pam: Allow compilation on GNU/Hurd.

Message ID 20230328142852.26635-17-ludo@gnu.org
State New
Headers show
Series Update Hurd and fix build failures | expand

Commit Message

Ludovic Courtès March 28, 2023, 2:28 p.m. UTC
* gnu/packages/linux.scm (linux-pam)[arguments]: Add #:phases.
---
 gnu/packages/linux.scm | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1c770bf9ba..a63eeeb706 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1824,6 +1824,16 @@  (define-public linux-pam
                                        #~("--disable-nis")
                                        #~()))
 
+      #:phases (if (target-hurd?)
+                   #~(modify-phases %standard-phases
+                       (add-after 'unpack 'skip-pam-limits
+                         (lambda _
+                           ;; 'pam_limits.c' uses <sys/prctl.h>, which is
+                           ;; Linux-specific.  Skip it on GNU/Hurd.
+                           (substitute* "modules/Makefile.in"
+                             (("pam_limits") "")))))
+                   #~%standard-phases)
+
       ;; XXX: Tests won't run in chroot, presumably because /etc/pam.d
       ;; isn't available.
       #:tests? #f))