diff --git a/src/tests/system/libroot/posix/flock_test.cpp b/src/tests/system/libroot/posix/flock_test.cpp index e5d71ce021..9eeaa83227 100644 --- a/src/tests/system/libroot/posix/flock_test.cpp +++ b/src/tests/system/libroot/posix/flock_test.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -19,7 +20,7 @@ bool gDone = false; static int32 try_to_lock(void *_fd) { - int fd = (int)_fd; + intptr_t fd = (intptr_t)_fd; struct flock flock = { F_RDLCK, // shared lock @@ -60,7 +61,7 @@ try_to_lock(void *_fd) int main(int argc, char **argv) { - int fd = open("/bin/sh", O_RDONLY); + intptr_t fd = open("/bin/sh", O_RDONLY); if (fd < 0) { fprintf(stderr, "could not open file: %s\n", strerror(errno)); return -1;