Skip to content

Commit b90fda7

Browse files
JohnTitorMic92phi-gamma
committed
Add renameat2 and change their flags' type to c_uint
Co-Authored-By: Jörg Thalheim <[email protected]> Co-Authored-By: Philipp Gesang <[email protected]>
1 parent 801487e commit b90fda7

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,13 @@ extern "C" {
14771477
offset: ::off_t,
14781478
flags: ::c_int,
14791479
) -> ::ssize_t;
1480+
pub fn renameat2(
1481+
olddirfd: ::c_int,
1482+
oldpath: *const ::c_char,
1483+
newdirfd: ::c_int,
1484+
newpath: *const ::c_char,
1485+
flags: ::c_uint,
1486+
) -> ::c_int;
14801487
}
14811488

14821489
extern "C" {

src/unix/linux_like/linux/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,9 +1418,9 @@ pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0;
14181418
pub const PTHREAD_PROCESS_SHARED: ::c_int = 1;
14191419
pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
14201420

1421-
pub const RENAME_NOREPLACE: ::c_int = 1;
1422-
pub const RENAME_EXCHANGE: ::c_int = 2;
1423-
pub const RENAME_WHITEOUT: ::c_int = 4;
1421+
pub const RENAME_NOREPLACE: ::c_uint = 1;
1422+
pub const RENAME_EXCHANGE: ::c_uint = 2;
1423+
pub const RENAME_WHITEOUT: ::c_uint = 4;
14241424

14251425
pub const SCHED_OTHER: ::c_int = 0;
14261426
pub const SCHED_FIFO: ::c_int = 1;

0 commit comments

Comments
 (0)