Skip to content

Commit e3dd608

Browse files
committed
Auto merge of #2116 - JohnTitor:renameat2, r=Amanieu
Add `renameat2` and change their flags' type to `c_uint` Taking over #1508. This changes the type of some flags but it should've been `c_uint`. Closes #1508
2 parents 801487e + b90fda7 commit e3dd608

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

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

+7
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

+3-3
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)