commit | 7802bae74477ed06dbfd4a140fd197cb23178198 | [log] [tgz] |
---|---|---|
author | Radek Krejci <rkrejci@cesnet.cz> | Mon Nov 26 15:34:10 2018 +0100 |
committer | Radek Krejci <rkrejci@cesnet.cz> | Mon Nov 26 15:34:10 2018 +0100 |
tree | 0ab61e1983718ea44d553098aae253ccf5ab66dd | |
parent | cad716e8a2a9305a2c41e1ca59b2342bf4a68307 [diff] [blame] |
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 {