Add compat wrapper for fstatat

This commit is contained in:
Christian Göttsche
2020-10-26 21:16:43 +01:00
committed by cgzones
parent 049046c700
commit bbf01054bf
5 changed files with 71 additions and 3 deletions

View File

@ -22,6 +22,7 @@ in the source distribution for its full text.
#include <sys/types.h>
#include <sys/user.h>
#include "Compat.h"
#include "CRT.h"
#include "FreeBSDProcess.h"
#include "Macros.h"
@ -338,7 +339,7 @@ static void FreeBSDProcessList_scanTTYs(ProcessList* pl) {
continue;
struct stat info;
if (fstatat(dirFd, entry->d_name, &info, 0) < 0)
if (Compat_fstatat(dirFd, "/dev", entry->d_name, &info, 0) < 0)
continue;
if (!S_ISCHR(info.st_mode))
@ -365,7 +366,7 @@ err1:
const struct dirent* entry;
while ((entry = readdir(dirPtr))) {
struct stat info;
if (fstatat(dirFd, entry->d_name, &info, 0) < 0)
if (Compat_fstatat(dirFd, "/dev/pts", entry->d_name, &info, 0) < 0)
continue;
if (!S_ISCHR(info.st_mode))