mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
e5653eb82d
And in a separate header, so that we erode util.h a bit more. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-xpzvuu9d0gei9jl9bkzgobln@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
19 lines
473 B
C
19 lines
473 B
C
// SPDX-License-Identifier: LGPL-2.1
|
|
// Copyright (C) 2018, 2019 Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
|
|
//
|
|
#ifndef HAVE_GET_CURRENT_DIR_NAME
|
|
#include "get_current_dir_name.h"
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <stdlib.h>
|
|
|
|
/* Android's 'bionic' library, for one, doesn't have this */
|
|
|
|
char *get_current_dir_name(void)
|
|
{
|
|
char pwd[PATH_MAX];
|
|
|
|
return getcwd(pwd, sizeof(pwd)) == NULL ? NULL : strdup(pwd);
|
|
}
|
|
#endif // HAVE_GET_CURRENT_DIR_NAME
|