From b8be4f7268eec1985a603adce5399ae68c4ddc0b Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Mon, 2 Feb 2015 15:38:39 +0000 Subject: [PATCH] tests: Fix libroot flock pointer size on non-32bit platforms --- src/tests/system/libroot/posix/flock_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;