aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-11-02 20:14:24 +0100
committerMichael Stapelberg <michael@stapelberg.de>2021-11-03 09:03:33 +0100
commitc6ea9bbace42d3159167c548b56f30d2ed150642 (patch)
tree55619170ad7cf486fddb5c0003bab549f7f3c0b1
parent058ebb0d427ed3ad662e3388dcedfca8ad0f67ae (diff)
downloadi3-c6ea9bbace42d3159167c548b56f30d2ed150642.tar.gz
i3-c6ea9bbace42d3159167c548b56f30d2ed150642.zip
portability: use getcwd() instead of get_current_dir_name() (#4645)
-rw-r--r--src/config_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/config_parser.c b/src/config_parser.c
index 860ea86f..9cba93bc 100644
--- a/src/config_parser.c
+++ b/src/config_parser.c
@@ -864,7 +864,7 @@ parse_file_result_t parse_file(struct parser_ctx *ctx, const char *f, IncludedFi
FILE *fstr;
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;
/* dirname(3) might modify the buffer, so make a copy: */
char *dirbuf = sstrdup(f);