File 4491-ssh-fix-cross-builds-of-tests.patch of Package erlang
From d1b2dad88dfa70dbe2536ce853be2a79087d1ce1 Mon Sep 17 00:00:00 2001
From: Jakub Witczak <kuba@erlang.org>
Date: Mon, 15 Dec 2025 12:43:14 +0100
Subject: [PATCH] ssh: fix cross builds of tests
- mark test files as depending on header files from src
- use include
---
lib/ssh/test/Makefile | 4 ++++
lib/ssh/test/ssh_trpt_test_lib.erl | 6 +++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/ssh/test/Makefile b/lib/ssh/test/Makefile
index a92c7d551f..19060568af 100644
--- a/lib/ssh/test/Makefile
+++ b/lib/ssh/test/Makefile
@@ -146,3 +146,7 @@ release_tests_spec: opt
@tar cf - *_SUITE_data property_test | (cd "$(RELSYSDIR)"; tar xf -)
release_docs_spec:
+
+# Dependencies
+
+$(TARGET_FILES): $(HRL_FILES)
diff --git a/lib/ssh/test/ssh_trpt_test_lib.erl b/lib/ssh/test/ssh_trpt_test_lib.erl
index 6544b8ed35..1d1f6474bd 100644
--- a/lib/ssh/test/ssh_trpt_test_lib.erl
+++ b/lib/ssh/test/ssh_trpt_test_lib.erl
@@ -32,9 +32,9 @@
).
-include_lib("common_test/include/ct.hrl").
--include_lib("ssh/src/ssh.hrl"). % ?UINT32, ?BYTE, #ssh{} ...
--include_lib("ssh/src/ssh_transport.hrl").
--include_lib("ssh/src/ssh_auth.hrl").
+-include("../src/ssh.hrl"). % ?UINT32, ?BYTE, #ssh{} ...
+-include("../src/ssh_transport.hrl").
+-include("../src/ssh_auth.hrl").
%%%----------------------------------------------------------------
-record(s, {
--
2.51.0