From 17a9ff4caa3e2e9c89adc5b3a8dfd4907945c8fc Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Mon, 27 May 2024 17:08:36 -0400 Subject: [PATCH] Fix compile error triggered by enabling TEST_IPV6 --- apps/wolfsshd/wolfsshd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/wolfsshd/wolfsshd.c b/apps/wolfsshd/wolfsshd.c index 8631f4fc8..e994df50a 100644 --- a/apps/wolfsshd/wolfsshd.c +++ b/apps/wolfsshd/wolfsshd.c @@ -2396,8 +2396,13 @@ static int StartSSHD(int argc, char** argv) conn->fd = (int)accept(listenFd, (struct sockaddr*)&clientAddr, &clientAddrSz); if (conn->fd >= 0) { - inet_ntop(AF_INET, &clientAddr.sin_addr, conn->ip, - INET_ADDRSTRLEN); + inet_ntop(AF_INET, +#ifdef TEST_IPV6 + &clientAddr.sin6_addr, +#else + &clientAddr.sin_addr, +#endif /* TEST_IPV6 */ + conn->ip, INET_ADDRSTRLEN); } #endif