@@ -622,10 +622,8 @@ extern "C" {
622
622
target_vendor = "nintendo"
623
623
) ) ) ]
624
624
#[ cfg_attr( target_os = "netbsd" , link_name = "__socket30" ) ]
625
- #[ cfg_attr(
626
- any( target_os = "illumos" , target_os = "solaris" ) ,
627
- link_name = "__xnet_socket"
628
- ) ]
625
+ #[ cfg_attr( target_os = "illumos" , link_name = "__xnet_socket" ) ]
626
+ #[ cfg_attr( target_os = "solaris" , link_name = "__xnet7_socket" ) ]
629
627
#[ cfg_attr( target_os = "espidf" , link_name = "lwip_socket" ) ]
630
628
pub fn socket ( domain : :: c_int , ty : :: c_int , protocol : :: c_int ) -> :: c_int ;
631
629
#[ cfg( not( all(
@@ -931,6 +929,7 @@ extern "C" {
931
929
pub fn getppid ( ) -> pid_t ;
932
930
pub fn getuid ( ) -> uid_t ;
933
931
pub fn isatty ( fd : :: c_int ) -> :: c_int ;
932
+ #[ cfg_attr( target_os = "solaris" , link_name = "__link_xpg4" ) ]
934
933
pub fn link ( src : * const c_char , dst : * const c_char ) -> :: c_int ;
935
934
pub fn lseek ( fd : :: c_int , offset : off_t , whence : :: c_int ) -> off_t ;
936
935
pub fn pathconf ( path : * const c_char , name : :: c_int ) -> c_long ;
@@ -968,7 +967,10 @@ extern "C" {
968
967
all( target_os = "macos" , target_arch = "x86" ) ,
969
968
link_name = "ttyname_r$UNIX2003"
970
969
) ]
971
- #[ cfg_attr( target_os = "illumos" , link_name = "__posix_ttyname_r" ) ]
970
+ #[ cfg_attr(
971
+ any( target_os = "illumos" , target_os = "solaris" ) ,
972
+ link_name = "__posix_ttyname_r"
973
+ ) ]
972
974
pub fn ttyname_r ( fd : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
973
975
pub fn unlink ( c : * const c_char ) -> :: c_int ;
974
976
#[ cfg_attr(
@@ -1089,8 +1091,6 @@ extern "C" {
1089
1091
) ]
1090
1092
pub fn realpath ( pathname : * const :: c_char , resolved : * mut :: c_char ) -> * mut :: c_char ;
1091
1093
1092
- pub fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int ;
1093
-
1094
1094
#[ cfg_attr( target_os = "netbsd" , link_name = "__times13" ) ]
1095
1095
pub fn times ( buf : * mut :: tms ) -> :: clock_t ;
1096
1096
@@ -1399,6 +1399,7 @@ extern "C" {
1399
1399
#[ cfg_attr( target_os = "netbsd" , link_name = "__sigpending14" ) ]
1400
1400
pub fn sigpending ( set : * mut sigset_t ) -> :: c_int ;
1401
1401
1402
+ #[ cfg_attr( target_os = "solaris" , link_name = "__sysconf_xpg7" ) ]
1402
1403
pub fn sysconf ( name : :: c_int ) -> :: c_long ;
1403
1404
1404
1405
pub fn mkfifo ( path : * const c_char , mode : mode_t ) -> :: c_int ;
@@ -1452,10 +1453,15 @@ cfg_if! {
1452
1453
if #[ cfg( not( any( target_os = "emscripten" ,
1453
1454
target_os = "android" ,
1454
1455
target_os = "haiku" ,
1455
- target_os = "nto" ) ) ) ] {
1456
+ target_os = "nto" ,
1457
+ target_os = "solaris" ) ) ) ] {
1456
1458
extern "C" {
1457
1459
pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> :: c_int;
1458
1460
}
1461
+ } else if #[ cfg( target_os = "solaris" ) ] {
1462
+ extern "C" {
1463
+ pub fn adjtime( delta: * mut timeval, olddelta: * mut timeval) -> :: c_int;
1464
+ }
1459
1465
}
1460
1466
}
1461
1467
@@ -1477,6 +1483,14 @@ cfg_if! {
1477
1483
}
1478
1484
}
1479
1485
1486
+ cfg_if ! {
1487
+ if #[ cfg( not( target_os = "solaris" ) ) ] {
1488
+ extern "C" {
1489
+ pub fn flock( fd: :: c_int, operation: :: c_int) -> :: c_int;
1490
+ }
1491
+ }
1492
+ }
1493
+
1480
1494
cfg_if ! {
1481
1495
if #[ cfg( not( any( target_env = "uclibc" , target_os = "nto" ) ) ) ] {
1482
1496
extern "C" {
0 commit comments