There are two defined
$ grep -rI O_DIRECT /usr/include/* | grep -v ORY | grep -v __
/usr/include/asm/fcntl.h:#define O_DIRECT
0400000 /* direct disk access hint */
/usr/include/asm-generic/fcntl.h:#define O_DIRECT
00040000 /* direct disk access hint */
and of course I used the wrong one. The non-generic value is the right one.
#define VKI_O_TRUNC 01000 /* not fcntl */
#define VKI_O_APPEND 02000
#define VKI_O_NONBLOCK 04000
-#define VKI_O_DIRECT 040000
-#define VKI_O_LARGEFILE 0200000
+#define VKI_O_DIRECT 0400000
+#define VKI_O_LARGEFILE 0200000
#define VKI_AT_FDCWD -100
#define VKI_O_TRUNC 01000 /* not fcntl */
#define VKI_O_APPEND 02000
#define VKI_O_NONBLOCK 04000
-#define VKI_O_DIRECT 040000
+#define VKI_O_DIRECT 0400000
#define VKI_O_LARGEFILE 0200000
#define VKI_AT_FDCWD -100