Skip to content
Snippets Groups Projects
Commit a3d48848 authored by Kamal Marhubi's avatar Kamal Marhubi
Browse files

unix: Include fdatasync(2) on non-Apple systems

The function is defined in POSIX [0], but according to Gnulib docs [1],
it is missing or not declared on at least some versions of OS X and
FreeBSD. On Solaris, it is not a system call but is present as
fdatasync(3) [2].

[0] http://www.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html
[1] https://www.gnu.org/software/gnulib/manual/html_node/fdatasync.html
[2] http://docs.oracle.com/cd/E36784_01/html/E36874/fdatasync-3c.html
parent 5f527b07
No related branches found
No related tags found
No related merge requests found
...@@ -388,6 +388,7 @@ extern { ...@@ -388,6 +388,7 @@ extern {
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
} }
cfg_if! { cfg_if! {
......
...@@ -765,5 +765,6 @@ extern { ...@@ -765,5 +765,6 @@ extern {
buf: *mut ::c_char, buf: *mut ::c_char,
buflen: ::size_t) -> *const passwd; buflen: ::size_t) -> *const passwd;
pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent; pub fn readdir(dirp: *mut ::DIR) -> *const ::dirent;
pub fn fdatasync(fd: ::c_int) -> ::c_int;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment