gnu: sudo: Fix cross-compilation.

Fixes a regression introduced in
be50b25b7b.

* gnu/packages/admin.scm (sudo)[arguments]: Define ‘ac_cv_*’ when
cross-compiling.

Change-Id: Iaa6f856c902ff8e06d790f8b1bc49ecda66ce5f2
This commit is contained in:
Ludovic Courtès 2024-09-16 10:06:01 +02:00
parent c0d4bd52ee
commit 79726a0507
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -2072,7 +2072,16 @@ system administrator.")
;; provide it.
(string-append "CPPFLAGS=-D_PATH_MV=\\\""
(assoc-ref %build-inputs "coreutils")
"/bin/mv\\\""))
"/bin/mv\\\"")
;; When cross-compiling, assume we have a working 'snprintf' and
;; 'vsnprintf' (which we do, when using glibc). The default
;; choice fails with undefined references to 'sudo_snprintf' &
;; co. when linking.
,@(if (%current-target-system)
'("ac_cv_have_working_snprintf=yes"
"ac_cv_have_working_vsnprintf=yes")
'()))
;; Avoid non-determinism; see <http://bugs.gnu.org/21918>.
#:parallel-build? #f