aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/physmem-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/physmem-posix.c b/lib/physmem-posix.c
index 664ec48..7cd7e99 100644
--- a/lib/physmem-posix.c
+++ b/lib/physmem-posix.c
@@ -26,7 +26,7 @@
#include <unistd.h>
#ifndef OFF_MAX
-#define OFF_MAX (off_t)((1ULL << (sizeof(off_t) * CHAR_BIT - 1)) - 1)
+#define OFF_MAX ((((off_t)1 << (sizeof(off_t) * CHAR_BIT - 2)) - 1) * 2 + 1)
#endif
struct physmem {