BUGFIX use of PATH_MAX (for OSX)
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index b815bbc..deff2ce 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -616,7 +616,11 @@
     LY_CHECK_ERR_GOTO(!mod, ly_errcode(ctx), cleanup);
 
     if (!mod->parsed->filepath) {
+#ifdef __APPLE__
+        char rpath[MAXPATHLEN];
+#else
         char rpath[PATH_MAX];
+#endif
         if (realpath(filepath, rpath) != NULL) {
             mod->parsed->filepath = lydict_insert(ctx, rpath, 0);
         } else {