diff --git a/libc/sysv/consts.sh b/libc/sysv/consts.sh index 47cdd9b00..5d84f3089 100755 --- a/libc/sysv/consts.sh +++ b/libc/sysv/consts.sh @@ -266,6 +266,7 @@ syscon madv MADV_HUGEPAGE 14 14 127 127 127 127 127 127 # TOD syscon madv MADV_NOHUGEPAGE 15 15 127 127 127 127 127 127 # TODO(jart): why would we need it? syscon madv MADV_DODUMP 17 17 127 127 127 127 127 127 # TODO(jart): what is it? syscon madv MADV_WIPEONFORK 18 18 127 127 127 127 127 127 # TODO: add support ? +syscon madv MADV_KEEPONFORK 19 19 127 127 127 127 127 127 # TODO: add support ? syscon madv MADV_DOFORK 11 11 127 127 127 127 127 127 # TODO(jart): what is it? syscon madv MADV_DONTDUMP 16 16 127 127 127 127 127 127 # see MAP_CONCEAL in OpenBSD; TODO(jart): what is it? syscon madv MADV_DONTFORK 10 10 127 127 127 127 127 127 # TODO(jart): what is it? diff --git a/libc/sysv/consts/MADV_KEEPONFORK.S b/libc/sysv/consts/MADV_KEEPONFORK.S new file mode 100644 index 000000000..eed8fe329 --- /dev/null +++ b/libc/sysv/consts/MADV_KEEPONFORK.S @@ -0,0 +1,2 @@ +#include "libc/sysv/consts/syscon.internal.h" +.syscon madv,MADV_KEEPONFORK,19,19,127,127,127,127,127,127 diff --git a/libc/sysv/consts/madv.h b/libc/sysv/consts/madv.h index 90266929b..2b3653805 100644 --- a/libc/sysv/consts/madv.h +++ b/libc/sysv/consts/madv.h @@ -21,6 +21,7 @@ extern const unsigned MADV_UNMERGEABLE; extern const unsigned MADV_WILLNEED; extern const unsigned MADV_SOFT_OFFLINE; extern const unsigned MADV_WIPEONFORK; +extern const unsigned MADV_KEEPONFORK; #define MADV_NORMAL 0 #define MADV_RANDOM 1