diff --git a/Userland/Libraries/LibC/fcntl.cpp b/Userland/Libraries/LibC/fcntl.cpp index 7927845678e..8a8ab0f11f2 100644 --- a/Userland/Libraries/LibC/fcntl.cpp +++ b/Userland/Libraries/LibC/fcntl.cpp @@ -117,7 +117,7 @@ int posix_fadvise(int fd, off_t offset, off_t len, int advice) int posix_fallocate(int fd, off_t offset, off_t len) { // posix_fallocate does not set errno. - return static_cast(syscall(SC_posix_fallocate, fd, &offset, &len)); + return -static_cast(syscall(SC_posix_fallocate, fd, &offset, &len)); } // https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimensat.html