portability: use getcwd() instead of get_current_dir_name() (#4645)
This commit is contained in:
committed by
GitHub
parent
e4d3ec9217
commit
aceb36ae60
@ -864,7 +864,7 @@ parse_file_result_t parse_file(struct parser_ctx *ctx, const char *f, IncludedFi
|
|||||||
FILE *fstr;
|
FILE *fstr;
|
||||||
char buffer[4096], key[512], value[4096], *continuation = NULL;
|
char buffer[4096], key[512], value[4096], *continuation = NULL;
|
||||||
|
|
||||||
char *old_dir = get_current_dir_name();
|
char *old_dir = getcwd(NULL, 0);
|
||||||
char *dir = NULL;
|
char *dir = NULL;
|
||||||
/* dirname(3) might modify the buffer, so make a copy: */
|
/* dirname(3) might modify the buffer, so make a copy: */
|
||||||
char *dirbuf = sstrdup(f);
|
char *dirbuf = sstrdup(f);
|
||||||
|
Reference in New Issue
Block a user