Skip to content

Commit 09464cf

Browse files
Mic92phi-gamma
authored andcommitted
add renameat2 and flags
This used to be PR #554. Adapted to match the current state of *libc*. Also, adapt for the fact that in Linux, the *flags* argument is of type *unsigned*, not *int*.
1 parent 71e298f commit 09464cf

File tree

1 file changed

+6
-3
lines changed
  • src/unix/linux_like/linux

1 file changed

+6
-3
lines changed

src/unix/linux_like/linux/mod.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1185,9 +1185,9 @@ pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
11851185
pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
11861186
pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
11871187

1188-
pub const RENAME_NOREPLACE: ::c_int = 1;
1189-
pub const RENAME_EXCHANGE: ::c_int = 2;
1190-
pub const RENAME_WHITEOUT: ::c_int = 4;
1188+
pub const RENAME_NOREPLACE: ::c_uint = 1;
1189+
pub const RENAME_EXCHANGE: ::c_uint = 2;
1190+
pub const RENAME_WHITEOUT: ::c_uint = 4;
11911191

11921192
pub const SCHED_OTHER: ::c_int = 0;
11931193
pub const SCHED_FIFO: ::c_int = 1;
@@ -2777,6 +2777,9 @@ extern {
27772777
pub fn inotify_add_watch(fd: ::c_int,
27782778
path: *const ::c_char,
27792779
mask: u32) -> ::c_int;
2780+
pub fn renameat2(olddirfd: ::c_int, oldpath: *const ::c_char,
2781+
newdirfd: ::c_int, newpath: *const ::c_char,
2782+
flags: ::c_uint) -> ::c_int;
27802783
}
27812784

27822785
cfg_if! {

0 commit comments

Comments
 (0)