1 // SPDX-License-Identifier: LGPL-2.1
2 // Copyright (C) 2018, 2019 Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
4 #ifndef HAVE_GET_CURRENT_DIR_NAME
5 #include "get_current_dir_name.h"
10 /* Android's 'bionic' library, for one, doesn't have this */
12 char *get_current_dir_name(void)
16 return getcwd(pwd
, sizeof(pwd
)) == NULL
? NULL
: strdup(pwd
);
18 #endif // HAVE_GET_CURRENT_DIR_NAME