From 44bba4c7530b6742a73f9c0389d2980036cb6b94 Mon Sep 17 00:00:00 2001
From: Dan Burkert <dan@danburkert.com>
Date: Tue, 3 Nov 2015 21:02:46 -0800
Subject: [PATCH] posix_fallocate(3) bindings

---
 src/unix/bsd/freebsdlike/mod.rs | 2 ++
 src/unix/notbsd/linux/mod.rs    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index 14d9f55a..376fce65 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -520,6 +520,8 @@ extern {
                         -> ::c_int;
     pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
     pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
 }
 
 cfg_if! {
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index 577814b6..478f5de2 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -283,6 +283,8 @@ extern {
     pub fn ftello64(stream: *mut ::FILE) -> ::off64_t;
     pub fn fallocate(fd: ::c_int, mode: ::c_int,
                      offset: ::off_t, len: ::off_t) -> ::c_int;
+    pub fn posix_fallocate(fd: ::c_int, offset: ::off_t,
+                           len: ::off_t) -> ::c_int;
 }
 
 cfg_if! {
-- 
GitLab