-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Milestone
Description
I'd like to use the Fallocate function from golang.org/x/sys/unix but found that it's missing the FALLOC_FL_* constants from /usr/include/linux/falloc.h. I believe the following patch to golang.org/x/sys/unix/mkerrors.sh should address the issue:
--- golang.org/x/sys/unix/mkerrors.sh.ORIG 2015-04-28 15:43:03.195157047 -0600
+++ golang.org/x/sys/unix/mkerrors.sh 2015-04-28 15:41:41.207778564 -0600
@@ -102,6 +102,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
+#include <linux/falloc.h>
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
@@ -272,6 +273,7 @@
$2 ~ /^IN_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^FALLOC_/ ||
$2 == "ICMPV6_FILTER" ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||Thanks,
— Scott
Reactions are currently unavailable