diff --git a/src/libs/zbxsysinfo/common/file.c b/src/libs/zbxsysinfo/common/file.c index 2f9e65b559..51df1c5ef2 100644 --- a/src/libs/zbxsysinfo/common/file.c +++ b/src/libs/zbxsysinfo/common/file.c @@ -1288,6 +1288,11 @@ static int get_dir_names(const char *filename, char **basename, char **dirname, #if defined(_WINDOWS) || defined(__MINGW32__) if (NULL == (*pathname = _fullpath(NULL, filename, 0))) return FAIL; +#elif defined(__hpux) + char resolved_path[PATH_MAX + 1]; + + if (NULL == (*pathname = realpath(filename, resolved_path))) + return FAIL; #else if (NULL == (*pathname = realpath(filename, NULL))) return FAIL;