diff options
author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-03-17 12:43:35 +0900 |
---|---|---|
committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-03-17 12:43:35 +0900 |
commit | b90fda7decf7cf4ae7401966ed59da12d4b4ac4d (patch) | |
tree | a9724893e735b35161ba62b8e8ae6fc84f2239ff /src | |
parent | 801487eca2101b57ef8489339593fe86e3197ec0 (diff) | |
download | rust-libc-b90fda7decf7cf4ae7401966ed59da12d4b4ac4d.tar.gz |
Add `renameat2` and change their flags' type to `c_uint`
Co-Authored-By: Jörg Thalheim <github@thalheim.io>
Co-Authored-By: Philipp Gesang <phg@phi-gamma.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/unix/linux_like/linux/gnu/mod.rs | 7 | ||||
-rw-r--r-- | src/unix/linux_like/linux/mod.rs | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 600257ac03..3fd760973d 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1477,6 +1477,13 @@ extern "C" { offset: ::off_t, flags: ::c_int, ) -> ::ssize_t; + pub fn renameat2( + olddirfd: ::c_int, + oldpath: *const ::c_char, + newdirfd: ::c_int, + newpath: *const ::c_char, + flags: ::c_uint, + ) -> ::c_int; } extern "C" { diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index c526d0207a..2d97df6073 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1418,9 +1418,9 @@ pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; pub const __SIZEOF_PTHREAD_COND_T: usize = 48; -pub const RENAME_NOREPLACE: ::c_int = 1; -pub const RENAME_EXCHANGE: ::c_int = 2; -pub const RENAME_WHITEOUT: ::c_int = 4; +pub const RENAME_NOREPLACE: ::c_uint = 1; +pub const RENAME_EXCHANGE: ::c_uint = 2; +pub const RENAME_WHITEOUT: ::c_uint = 4; pub const SCHED_OTHER: ::c_int = 0; pub const SCHED_FIFO: ::c_int = 1; |