@@ -603,10 +603,8 @@ extern "C" {
603603
604604 #[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
605605 #[ cfg_attr( target_os = "netbsd" , link_name = "__socket30" ) ]
606- #[ cfg_attr(
607- any( target_os = "illumos" , target_os = "solaris" ) ,
608- link_name = "__xnet_socket"
609- ) ]
606+ #[ cfg_attr( target_os = "illumos" , link_name = "__xnet_socket" ) ]
607+ #[ cfg_attr( target_os = "solaris" , link_name = "__xnet7_socket" ) ]
610608 #[ cfg_attr( target_os = "espidf" , link_name = "lwip_socket" ) ]
611609 pub fn socket ( domain : :: c_int , ty : :: c_int , protocol : :: c_int ) -> :: c_int ;
612610 #[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
@@ -892,6 +890,7 @@ extern "C" {
892890 pub fn getppid ( ) -> pid_t ;
893891 pub fn getuid ( ) -> uid_t ;
894892 pub fn isatty ( fd : :: c_int ) -> :: c_int ;
893+ #[ cfg_attr( target_os = "solaris" , link_name = "__link_xpg4" ) ]
895894 pub fn link ( src : * const c_char , dst : * const c_char ) -> :: c_int ;
896895 pub fn lseek ( fd : :: c_int , offset : off_t , whence : :: c_int ) -> off_t ;
897896 pub fn pathconf ( path : * const c_char , name : :: c_int ) -> c_long ;
@@ -930,7 +929,10 @@ extern "C" {
930929 all( target_os = "macos" , target_arch = "x86" ) ,
931930 link_name = "ttyname_r$UNIX2003"
932931 ) ]
933- #[ cfg_attr( target_os = "illumos" , link_name = "__posix_ttyname_r" ) ]
932+ #[ cfg_attr(
933+ any( target_os = "illumos" , target_os = "solaris" ) ,
934+ link_name = "__posix_ttyname_r"
935+ ) ]
934936 pub fn ttyname_r ( fd : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
935937 pub fn unlink ( c : * const c_char ) -> :: c_int ;
936938 #[ cfg_attr(
@@ -1051,8 +1053,6 @@ extern "C" {
10511053 ) ]
10521054 pub fn realpath ( pathname : * const :: c_char , resolved : * mut :: c_char ) -> * mut :: c_char ;
10531055
1054- pub fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int ;
1055-
10561056 #[ cfg_attr( target_os = "netbsd" , link_name = "__times13" ) ]
10571057 pub fn times ( buf : * mut :: tms ) -> :: clock_t ;
10581058
@@ -1353,6 +1353,7 @@ extern "C" {
13531353 #[ cfg_attr( target_os = "netbsd" , link_name = "__sigpending14" ) ]
13541354 pub fn sigpending ( set : * mut sigset_t ) -> :: c_int ;
13551355
1356+ #[ cfg_attr( target_os = "solaris" , link_name = "__sysconf_xpg7" ) ]
13561357 pub fn sysconf ( name : :: c_int ) -> :: c_long ;
13571358
13581359 pub fn mkfifo ( path : * const c_char , mode : mode_t ) -> :: c_int ;
@@ -1423,12 +1424,20 @@ cfg_if! {
14231424 if #[ cfg( not( any( target_os = "emscripten" ,
14241425 target_os = "android" ,
14251426 target_os = "haiku" ,
1426- target_os = "nto" ) ) ) ] {
1427+ target_os = "nto" ,
1428+ target_os = "solaris" ) ) ) ] {
14271429 extern "C" {
14281430 pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> :: c_int;
14291431 }
14301432 }
14311433}
1434+ cfg_if ! {
1435+ if #[ cfg( target_os = "solaris" ) ] {
1436+ extern "C" {
1437+ pub fn adjtime( delta: * mut timeval, olddelta: * mut timeval) -> :: c_int;
1438+ }
1439+ }
1440+ }
14321441
14331442cfg_if ! {
14341443 if #[ cfg( not( any( target_os = "emscripten" ,
@@ -1448,6 +1457,14 @@ cfg_if! {
14481457 }
14491458}
14501459
1460+ cfg_if ! {
1461+ if #[ cfg( not( target_os = "solaris" ) ) ] {
1462+ extern "C" {
1463+ pub fn flock( fd: :: c_int, operation: :: c_int) -> :: c_int;
1464+ }
1465+ }
1466+ }
1467+
14511468cfg_if ! {
14521469 if #[ cfg( not( any( target_env = "uclibc" , target_os = "nto" ) ) ) ] {
14531470 extern "C" {
0 commit comments