git: ac62b97951c2 - main - openssh: Add ${SKSRCS} to libssh

From: Jose Luis Duran <jlduran_at_FreeBSD.org>
Date: Tue, 20 May 2025 22:59:43 UTC
The branch main has been updated by jlduran:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac62b97951c25a33ec0880e574ccff31be7452f7

commit ac62b97951c25a33ec0880e574ccff31be7452f7
Author:     Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2025-05-20 22:58:23 +0000
Commit:     Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2025-05-20 22:58:23 +0000

    openssh: Add ${SKSRCS} to libssh
    
    sshkey.c references sshsk_sign(), which is defined in ${SKSRCS}.
    
    Due to how FreeBSD builds libssh, or put differently, due to upstream
    not building a shared libssh.so, we need to partially revert
    65d8491719bb ("secure: Adapt Makefile to ssh-sk-client everywhere"), and
    add ${SKSRCS} back, to avoid linking problems, especially when building
    with GCC:
    
        /usr/local/bin/ld:
        /usr/obj/usr/src/amd64.amd64/secure/lib/libssh/libprivatessh.so:
        undefined reference to `sshsk_sign'
        collect2: error: ld returned 1 exit status`
    
    Put the sources in a separate line, to maintain line-by-line
    compatibility with upstream Makefile.in
    
    PR:             286580
    Reviewed by:    emaste
    Approved by:    emaste (mentor)
    Fixes:  65d8491719bb ("secure: Adapt Makefile to ssh-sk-client everywhere")
    Differential Revision:  https://reviews.freebsd.org/D50020
---
 secure/lib/libssh/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile
index 39083d007675..35883d4a9d42 100644
--- a/secure/lib/libssh/Makefile
+++ b/secure/lib/libssh/Makefile
@@ -39,6 +39,9 @@ SRCS=	${LIBOPENSSH_SRCS} \
 	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
 	sshbuf-io.c
 
+# Add ${SKSRCS} to avoid linking problems.
+SRCS+=	${SKSRCS}
+
 PACKAGE=	ssh
 
 # Portability layer