Skip to content

Commit bc48202

Browse files
author
Andrew Salmon
committed
remove getitimer and setitimer
_GNU_SOURCE works differently than other libraries and creates function pointer issues
1 parent 548e4cf commit bc48202

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ fn main() {
173173
cfg.header("sys/xattr.h");
174174
}
175175
cfg.header("sys/ipc.h");
176+
cfg.header("sys/sem.h");
176177
cfg.header("sys/msg.h");
177178
cfg.header("sys/shm.h");
178179
cfg.header("sys/fsuid.h");

src/unix/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,6 @@ extern {
570570

571571
pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int;
572572

573-
#[cfg_attr(target_os = "netbsd", link_name = "__getitimer50")]
574-
pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int;
575-
#[cfg_attr(target_os = "netbsd", link_name = "__setitimer50")]
576-
pub fn setitimer(which: ::c_int,
577-
new_value: *::itimerval,
578-
old_value: *::itimerval) -> ::c_int;
579573
#[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
580574
pub fn gettimeofday(tp: *mut ::timeval,
581575
tz: *mut ::c_void) -> ::c_int;

src/unix/notbsd/linux/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,9 @@ s! {
227227
}
228228

229229
pub struct sembuf {
230-
pub semval: ::c_ushort,
231-
pub semzcnt: ::c_ushort,
232-
pub semncnt: ::c_ushort,
233-
pub sempid: ::pid_t,
230+
pub sem_num: ::c_ushort,
231+
pub sem_op: ::c_short,
232+
pub semn_flg: ::c_short,
234233
}
235234

236235
pub struct semid_ds {

0 commit comments

Comments
 (0)