diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 03d5a3ed95..f2724e8ca3 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -450,9 +450,9 @@ struct SC_waitid_params { }; struct SC_stat_params { - int dirfd; StringArgument path; struct stat* statbuf; + int dirfd; int follow_symlinks; }; diff --git a/Userland/Libraries/LibC/stat.cpp b/Userland/Libraries/LibC/stat.cpp index e17e30eb65..f693c2c283 100644 --- a/Userland/Libraries/LibC/stat.cpp +++ b/Userland/Libraries/LibC/stat.cpp @@ -57,7 +57,7 @@ static int do_stat(int dirfd, const char* path, struct stat* statbuf, bool follo errno = EFAULT; return -1; } - Syscall::SC_stat_params params { dirfd, { path, strlen(path) }, statbuf, follow_symlinks }; + Syscall::SC_stat_params params { { path, strlen(path) }, statbuf, dirfd, follow_symlinks }; int rc = syscall(SC_stat, ¶ms); __RETURN_WITH_ERRNO(rc, rc, -1); }