@@ -625,10 +625,8 @@ extern "C" {
625
625
626
626
#[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
627
627
#[ cfg_attr( target_os = "netbsd" , link_name = "__socket30" ) ]
628
- #[ cfg_attr(
629
- any( target_os = "illumos" , target_os = "solaris" ) ,
630
- link_name = "__xnet_socket"
631
- ) ]
628
+ #[ cfg_attr( target_os = "illumos" , link_name = "__xnet_socket" ) ]
629
+ #[ cfg_attr( target_os = "solaris" , link_name = "__xnet7_socket" ) ]
632
630
#[ cfg_attr( target_os = "espidf" , link_name = "lwip_socket" ) ]
633
631
pub fn socket ( domain : :: c_int , ty : :: c_int , protocol : :: c_int ) -> :: c_int ;
634
632
#[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
@@ -914,6 +912,7 @@ extern "C" {
914
912
pub fn getppid ( ) -> pid_t ;
915
913
pub fn getuid ( ) -> uid_t ;
916
914
pub fn isatty ( fd : :: c_int ) -> :: c_int ;
915
+ #[ cfg_attr( target_os = "solaris" , link_name = "__link_xpg4" ) ]
917
916
pub fn link ( src : * const c_char , dst : * const c_char ) -> :: c_int ;
918
917
pub fn lseek ( fd : :: c_int , offset : off_t , whence : :: c_int ) -> off_t ;
919
918
pub fn pathconf ( path : * const c_char , name : :: c_int ) -> c_long ;
@@ -952,7 +951,10 @@ extern "C" {
952
951
all( target_os = "macos" , target_arch = "x86" ) ,
953
952
link_name = "ttyname_r$UNIX2003"
954
953
) ]
955
- #[ cfg_attr( target_os = "illumos" , link_name = "__posix_ttyname_r" ) ]
954
+ #[ cfg_attr(
955
+ any( target_os = "illumos" , target_os = "solaris" ) ,
956
+ link_name = "__posix_ttyname_r"
957
+ ) ]
956
958
pub fn ttyname_r ( fd : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
957
959
pub fn unlink ( c : * const c_char ) -> :: c_int ;
958
960
#[ cfg_attr(
@@ -1073,8 +1075,6 @@ extern "C" {
1073
1075
) ]
1074
1076
pub fn realpath ( pathname : * const :: c_char , resolved : * mut :: c_char ) -> * mut :: c_char ;
1075
1077
1076
- pub fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int ;
1077
-
1078
1078
#[ cfg_attr( target_os = "netbsd" , link_name = "__times13" ) ]
1079
1079
pub fn times ( buf : * mut :: tms ) -> :: clock_t ;
1080
1080
@@ -1375,6 +1375,7 @@ extern "C" {
1375
1375
#[ cfg_attr( target_os = "netbsd" , link_name = "__sigpending14" ) ]
1376
1376
pub fn sigpending ( set : * mut sigset_t ) -> :: c_int ;
1377
1377
1378
+ #[ cfg_attr( target_os = "solaris" , link_name = "__sysconf_xpg7" ) ]
1378
1379
pub fn sysconf ( name : :: c_int ) -> :: c_long ;
1379
1380
1380
1381
pub fn mkfifo ( path : * const c_char , mode : mode_t ) -> :: c_int ;
@@ -1445,10 +1446,15 @@ cfg_if! {
1445
1446
if #[ cfg( not( any( target_os = "emscripten" ,
1446
1447
target_os = "android" ,
1447
1448
target_os = "haiku" ,
1448
- target_os = "nto" ) ) ) ] {
1449
+ target_os = "nto" ,
1450
+ target_os = "solaris" ) ) ) ] {
1449
1451
extern "C" {
1450
1452
pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> :: c_int;
1451
1453
}
1454
+ } else if #[ cfg( target_os = "solaris" ) ] {
1455
+ extern "C" {
1456
+ pub fn adjtime( delta: * mut timeval, olddelta: * mut timeval) -> :: c_int;
1457
+ }
1452
1458
}
1453
1459
}
1454
1460
@@ -1470,6 +1476,14 @@ cfg_if! {
1470
1476
}
1471
1477
}
1472
1478
1479
+ cfg_if ! {
1480
+ if #[ cfg( not( target_os = "solaris" ) ) ] {
1481
+ extern "C" {
1482
+ pub fn flock( fd: :: c_int, operation: :: c_int) -> :: c_int;
1483
+ }
1484
+ }
1485
+ }
1486
+
1473
1487
cfg_if ! {
1474
1488
if #[ cfg( not( any( target_env = "uclibc" , target_os = "nto" ) ) ) ] {
1475
1489
extern "C" {
0 commit comments