Skip to content

Commit

Permalink
Add fstatat
Browse files Browse the repository at this point in the history
  • Loading branch information
KreitinnSoftware committed Oct 3, 2023
1 parent 5d28349 commit ef19580
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/wrapped/wrappedlibc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3328,6 +3328,15 @@ EXPORT void my___cxa_pure_virtual(x86emu_t* emu)
abort();
}

EXPORT int my_fstatat(int dirfd, const char* pathname, struct i386_stat64 *buf, int flags)
{
struct stat64 buf_ = {0};
int ret = fstatat64(dirfd, pathname, &buf_, flags);
if(buf)
UnalignStat64(&buf_, buf);
return ret;
}

EXPORT int my_fstatat64(int dirfd, const char* pathname, struct i386_stat64 *buf, int flags)
{
struct stat64 buf_ = {0};
Expand Down
1 change: 1 addition & 0 deletions src/wrapped/wrappedlibc_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2249,6 +2249,7 @@ GO(__utimensat_time64, iFippi)

GOM(fstatat64, iFippi) //%%,noE
GOM(fstat64, iFip) //%%,noE
GOM(fstatat, iFippi) //%%,noE

GOWM(_Unwind_Find_FDE, pFEpp) // this is a libgcc_s function, I think. Create a dummy weak one, just in case
GO(dummy__ZnwmSt11align_val_tRKSt9nothrow_t, pFLLp) // for mallochook.c
Expand Down

0 comments on commit ef19580

Please sign in to comment.