gnu: ntp: Fix cross-compilation inputs.

* gnu/packages/ntp.scm (ntp)[inputs]: Use `target-linux?' instead of
  the manual string comparison as it would not add the libcap input
  correctly when cross-compiling as the platform ends in `-linux-gnu'
  unlike the system string which ends in `-linux'.

Signed-off-by: Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Jean-Pierre De Jesus DIAZ 2023-08-07 14:17:49 +02:00 committed by Ludovic Courtès
parent eb25c2b3e2
commit 6bbef3d9a2
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -139,8 +139,7 @@ (define-public ntp
libevent
;; Build with POSIX capabilities support on GNU/Linux. This allows
;; 'ntpd' to run as non-root (when invoked with '-u'.)
(if (string-suffix? "-linux"
(or (%current-target-system) (%current-system)))
(if (target-linux?)
(list libcap)
'())))
(arguments