Skip to content

Commit

Permalink
Add networking symbols for uclibc/x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
humenda committed Sep 6, 2017
1 parent e102a72 commit dee3699
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/uclibc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,10 @@ extern {
pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
parent: Option<unsafe extern fn()>,
child: Option<unsafe extern fn()>) -> ::c_int;
pub fn pthread_create(native: *mut ::pthread_t,
attr: *const ::pthread_attr_t,
f: extern fn(*mut ::c_void) -> *mut ::c_void,
value: *mut ::c_void) -> ::c_int;
pub fn getgrgid(gid: ::gid_t) -> *mut ::group;
#[cfg_attr(all(target_os = "macos", target_arch = "x86"),
link_name = "popen$UNIX2003")]
Expand All @@ -1827,3 +1831,4 @@ cfg_if! {
pub use unsupported_target;
}
}

8 changes: 8 additions & 0 deletions src/unix/uclibc/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ pub const SIG_SETMASK: ::c_int = 2; // Set the set of blocked signals
pub const PTHREAD_STACK_MIN: usize = 16384;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const SO_BROADCAST: ::c_int = 6;
pub const SOCK_DGRAM: ::c_int = 2; // connectionless, unreliable datagrams
pub const SOCK_STREAM: ::c_int = 1; // …/common/bits/socket_type.h
pub const SO_ERROR: ::c_int = 4;
pub const SOL_SOCKET: ::c_int = 1;
pub const SO_RCVTIMEO: ::c_int = 20;
pub const SO_REUSEADDR: ::c_int = 2;
pub const SO_SNDTIMEO: ::c_int = 21;
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0;
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2;
Expand Down

0 comments on commit dee3699

Please sign in to comment.