From 6fe488858667c437aff2c5784bbd70b842f39be9 Mon Sep 17 00:00:00 2001
From: barracuda156 <vital.had@gmail.com>
Date: Tue, 4 Jun 2024 09:05:45 +0800
Subject: [PATCH] threads.c: provide def of MAXTHREADNAMESIZE when
 undefined on macOS

---
 src/ddsrt/src/threads/posix/threads.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git src/ddsrt/src/threads/posix/threads.c src/ddsrt/src/threads/posix/threads.c
index 684468f5..466a0a64 100644
--- src/ddsrt/src/threads/posix/threads.c
+++ src/ddsrt/src/threads/posix/threads.c
@@ -50,6 +50,9 @@ typedef struct {
 #include <mach/task_info.h>
 #include <mach/vm_map.h>
 #include <AvailabilityMacros.h>
+#ifndef MAXTHREADNAMESIZE
+#define MAXTHREADNAMESIZE (64)
+#endif /* MAXTHREADNAMESIZE */
 #elif defined(__sun)
 #define MAXTHREADNAMESIZE (31)
 #elif defined(__FreeBSD__)
