Skip to content

Commit baaab4c

Browse files
authored
Merge pull request #8722 from anhu/undef_def
Do not allow define of max to interfere with pthreads
2 parents 49d9bfa + af29a59 commit baaab4c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

wolfssl/wolfcrypt/wc_port.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@
268268
#if !defined(CONFIG_PTHREAD_IPC) && !defined(CONFIG_POSIX_THREADS)
269269
#error "Threading needs CONFIG_PTHREAD_IPC / CONFIG_POSIX_THREADS"
270270
#endif
271+
#ifdef max
272+
#undef max
273+
#endif
271274
#if KERNEL_VERSION_NUMBER >= 0x30100
272275
#include <zephyr/kernel.h>
273276
#include <zephyr/posix/posix_types.h>
@@ -277,6 +280,7 @@
277280
#include <posix/posix_types.h>
278281
#include <posix/pthread.h>
279282
#endif
283+
#define max MAX
280284
#endif
281285
#elif defined(WOLFSSL_TELIT_M2MB)
282286

0 commit comments

Comments
 (0)