]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
include/fcntl.h: define posix_fadvise advice parameters
authorStefan Teodorescu <stefanl.teodorescu@gmail.com>
Thu, 28 Nov 2019 14:39:10 +0000 (16:39 +0200)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Thu, 28 Nov 2019 15:02:56 +0000 (17:02 +0200)
Since posix_fadvise function was implemented, it needs to build with
newlib too, so it needs definitions for advice parameters.

Signed-off-by: Stefan Teodorescu <stefanl.teodorescu@gmail.com>
Reviewed-by: Costin Lupu <costin.lupu@cs.pub.ro>
include/fcntl.h

index 7a35052986221f23992ed0ecc09635c9164a747f..cb271d26a07c0c1343de874b917b7199d64f8611 100644 (file)
 #define FIONBIO      0x5421
 #define FIOASYNC     0x5452
 
+#define POSIX_FADV_NORMAL     0
+#define POSIX_FADV_RANDOM     1
+#define POSIX_FADV_SEQUENTIAL 2
+#define POSIX_FADV_WILLNEED   3
+#define POSIX_FADV_DONTNEED   4
+#define POSIX_FADV_NOREUSE    5
 
 /* Glibc does not provide KEEP_SIZE and PUNCH_HOLE anymore. Instead it
  * includes linux/falloc.h.