Skip to content

Commit

Permalink
remove getitimer and setitimer
Browse files Browse the repository at this point in the history
_GNU_SOURCE works differently than other libraries and creates
function pointer issues
  • Loading branch information
Andrew Salmon committed May 26, 2017
1 parent 548e4cf commit bc48202
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ fn main() {
cfg.header("sys/xattr.h");
}
cfg.header("sys/ipc.h");
cfg.header("sys/sem.h");
cfg.header("sys/msg.h");
cfg.header("sys/shm.h");
cfg.header("sys/fsuid.h");
Expand Down
6 changes: 0 additions & 6 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,12 +570,6 @@ extern {

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

#[cfg_attr(target_os = "netbsd", link_name = "__getitimer50")]
pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__setitimer50")]
pub fn setitimer(which: ::c_int,
new_value: *::itimerval,
old_value: *::itimerval) -> ::c_int;
#[cfg_attr(target_os = "netbsd", link_name = "__gettimeofday50")]
pub fn gettimeofday(tp: *mut ::timeval,
tz: *mut ::c_void) -> ::c_int;
Expand Down
7 changes: 3 additions & 4 deletions src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,9 @@ s! {
}

pub struct sembuf {
pub semval: ::c_ushort,
pub semzcnt: ::c_ushort,
pub semncnt: ::c_ushort,
pub sempid: ::pid_t,
pub sem_num: ::c_ushort,
pub sem_op: ::c_short,
pub semn_flg: ::c_short,
}

pub struct semid_ds {
Expand Down

0 comments on commit bc48202

Please sign in to comment.