diff mbox series

[bug#65125] gnu: ntp: Fix cross-compilation inputs.

Message ID 20230807121749.60346-1-jean@foundationdevices.com
State New
Headers show
Series [bug#65125] gnu: ntp: Fix cross-compilation inputs. | expand

Commit Message

Jean-Pierre De Jesus DIAZ Aug. 7, 2023, 12:17 p.m. UTC
* 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>
---
 gnu/packages/ntp.scm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Ludovic Courtès Aug. 12, 2023, 8:30 p.m. UTC | #1
Hi,

Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> skribis:

> * 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'.

Applied, thanks!

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/ntp.scm b/gnu/packages/ntp.scm
index 1a72efbc79..4ab8ab6631 100644
--- a/gnu/packages/ntp.scm
+++ b/gnu/packages/ntp.scm
@@ -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