From e1614f206bd4d231dc6e5b15e827c9b4ad5a933f Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Wed, 10 Jan 2024 13:12:10 +0800
Subject: [PATCH] stacktrace.cpp: include syslimits.h for PATH_MAX

---
 src/libasr/stacktrace.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git src/libasr/stacktrace.cpp src/libasr/stacktrace.cpp
index c356e4b3f..2c730a5ec 100644
--- src/libasr/stacktrace.cpp
+++ src/libasr/stacktrace.cpp
@@ -15,6 +15,11 @@
 // For registering SIGSEGV callbacks
 #include <csignal>
 
+#ifdef __APPLE__
+// For PATH_MAX
+#  include <sys/syslimits.h>
+#endif
+
 
 // The following C headers are needed for some specific C functionality (see
 // the comments), which is not available in C++:
