summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-11-02 19:10:43 +0100
committerAlfred E. Heggestad <alfred.heggestad@gmail.com>2016-11-02 19:10:43 +0100
commit99ee480df25fe3760a16544ee804300c8bddfb93 (patch)
tree591b3cbef07fb79662198c35139eb9989db5458f /src
parent6b296ddf9301401f4900813a970152fff9ac8169 (diff)
use PATH_MAX if defined
ref: https://github.com/alfredh/baresip/pull/165
Diffstat (limited to 'src')
-rw-r--r--src/core.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core.h b/src/core.h
index 2cda010..123a7cf 100644
--- a/src/core.h
+++ b/src/core.h
@@ -5,8 +5,17 @@
*/
+#include <limits.h>
+
+
/* max bytes in pathname */
-#define FS_PATH_MAX 256
+#if defined (PATH_MAX)
+#define FS_PATH_MAX PATH_MAX
+#elif defined (_POSIX_PATH_MAX)
+#define FS_PATH_MAX _POSIX_PATH_MAX
+#else
+#define FS_PATH_MAX 512
+#endif
/**