Auto merge of #673 - g2p:fallocate-flags, r=alexcrichton
Add all current fallocate flags Also move them to the common Linux module, as they are not platform-specific. See include/uapi/linux/falloc.h.
This commit is contained in:
commit
57413b8b14
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev ca-certificates \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev ca-certificates \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc-multilib libc6-dev ca-certificates
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN apt-get update
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:17.04
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev qemu-user ca-certificates \
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
gcc libc6-dev ca-certificates
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:16.10
|
||||
FROM ubuntu:17.10
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
|
@ -186,6 +186,7 @@ fn main() {
|
||||
cfg.header("sys/fsuid.h");
|
||||
cfg.header("shadow.h");
|
||||
cfg.header("linux/input.h");
|
||||
cfg.header("linux/falloc.h");
|
||||
if x86_64 {
|
||||
cfg.header("sys/io.h");
|
||||
}
|
||||
@ -431,6 +432,10 @@ fn main() {
|
||||
"MADV_MERGEABLE" | "MADV_UNMERGEABLE" | "MADV_HWPOISON" | "IPV6_ADD_MEMBERSHIP" | "IPV6_DROP_MEMBERSHIP" | "IPV6_MULTICAST_LOOP" | "IPV6_V6ONLY" |
|
||||
"MAP_STACK" | "RTLD_DEEPBIND" | "SOL_IPV6" | "SOL_ICMPV6" if uclibc => true,
|
||||
|
||||
// Musl uses old, patched kernel headers
|
||||
"FALLOC_FL_COLLAPSE_RANGE" | "FALLOC_FL_ZERO_RANGE" |
|
||||
"FALLOC_FL_INSERT_RANGE" | "FALLOC_FL_UNSHARE_RANGE" if musl => true,
|
||||
|
||||
// Defined by libattr not libc on linux (hard to test).
|
||||
// See constant definition for more details.
|
||||
"ENOATTR" if linux => true,
|
||||
|
@ -903,6 +903,13 @@ pub const XATTR_REPLACE: ::c_int = 0x2;
|
||||
|
||||
pub const _POSIX_VDISABLE: ::cc_t = 0;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08;
|
||||
pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10;
|
||||
pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20;
|
||||
pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40;
|
||||
|
||||
// On Linux, libc doesn't define this constant, libattr does instead.
|
||||
// We still define it for Linux as it's defined by libc on other platforms,
|
||||
// and it's mentioned in the man pages for getxattr and setxattr.
|
||||
|
@ -153,9 +153,6 @@ pub const TCP_TIMESTAMP: ::c_int = 24;
|
||||
|
||||
pub const SIGUNUSED: ::c_int = ::SIGSYS;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
|
||||
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
|
||||
|
@ -269,9 +269,6 @@ pub const SIGWINCH: ::c_int = 28;
|
||||
|
||||
pub const SIGEV_THREAD_ID: ::c_int = 4;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 8192;
|
||||
pub const TMP_MAX: ::c_uint = 238328;
|
||||
pub const FOPEN_MAX: ::c_uint = 16;
|
||||
|
@ -542,9 +542,6 @@ pub const SIGPWR: ::c_int = 30;
|
||||
pub const SIG_BLOCK: ::c_int = 0x000000;
|
||||
pub const SIG_UNBLOCK: ::c_int = 0x01;
|
||||
|
||||
pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01;
|
||||
pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02;
|
||||
|
||||
pub const BUFSIZ: ::c_uint = 8192;
|
||||
pub const TMP_MAX: ::c_uint = 238328;
|
||||
pub const FOPEN_MAX: ::c_uint = 16;
|
||||
|
Loading…
Reference in New Issue
Block a user