Skip to content

Commit d31cbb1

Browse files
committed
Auto merge of #2751 - guyru:master, r=Amanieu
Add unix adjtime support.
2 parents f6df53f + d76448f commit d31cbb1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4204,7 +4204,6 @@ extern "C" {
42044204
pub fn getpagesize() -> ::c_int;
42054205
pub fn getpagesizes(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int;
42064206

4207-
pub fn adjtime(arg1: *const ::timeval, arg2: *mut ::timeval) -> ::c_int;
42084207
pub fn clock_getcpuclockid2(arg1: ::id_t, arg2: ::c_int, arg3: *mut clockid_t) -> ::c_int;
42094208

42104209
pub fn shm_create_largepage(

src/unix/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,15 @@ extern "C" {
13891389
pub fn getline(lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t;
13901390

13911391
pub fn lockf(fd: ::c_int, cmd: ::c_int, len: ::off_t) -> ::c_int;
1392+
1393+
}
1394+
cfg_if! {
1395+
if #[cfg(not(any(target_os = "emscripten",
1396+
target_os = "android")))] {
1397+
extern "C" {
1398+
pub fn adjtime(delta: *const timeval, olddelta: *mut timeval) -> ::c_int;
1399+
}
1400+
}
13921401
}
13931402

13941403
cfg_if! {

0 commit comments

Comments
 (0)