From 59a9227913d64b55e5df443c4620cb3121a04a50 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Fri, 17 Oct 2025 17:00:03 -0600 Subject: [PATCH] example max() conflicts with toolchains max() function --- examples/portfwd/portfwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/portfwd/portfwd.c b/examples/portfwd/portfwd.c index 2eeadb6dc..3fa7954cb 100644 --- a/examples/portfwd/portfwd.c +++ b/examples/portfwd/portfwd.c @@ -72,7 +72,7 @@ static const char defaultFwdFromHost[] = "0.0.0.0"; -static inline int max(int a, int b) +static inline int findMax(int a, int b) { return (a > b) ? a : b; } @@ -407,7 +407,7 @@ THREAD_RETURN WOLFSSH_THREAD portfwd_worker(void* args) FD_ZERO(&templateFds); FD_SET(sshFd, &templateFds); FD_SET(listenFd, &templateFds); - nFds = max(sshFd, listenFd) + 1; + nFds = findMax(sshFd, listenFd) + 1; for (;;) { rxFds = templateFds;