@@ -606,10 +606,8 @@ extern "C" {
606
606
607
607
#[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
608
608
#[ cfg_attr( target_os = "netbsd" , link_name = "__socket30" ) ]
609
- #[ cfg_attr(
610
- any( target_os = "illumos" , target_os = "solaris" ) ,
611
- link_name = "__xnet_socket"
612
- ) ]
609
+ #[ cfg_attr( target_os = "illumos" , link_name = "__xnet_socket" ) ]
610
+ #[ cfg_attr( target_os = "solaris" , link_name = "__xnet7_socket" ) ]
613
611
#[ cfg_attr( target_os = "espidf" , link_name = "lwip_socket" ) ]
614
612
pub fn socket ( domain : :: c_int , ty : :: c_int , protocol : :: c_int ) -> :: c_int ;
615
613
#[ cfg( not( all( target_arch = "powerpc" , target_vendor = "nintendo" ) ) ) ]
@@ -895,6 +893,7 @@ extern "C" {
895
893
pub fn getppid ( ) -> pid_t ;
896
894
pub fn getuid ( ) -> uid_t ;
897
895
pub fn isatty ( fd : :: c_int ) -> :: c_int ;
896
+ #[ cfg_attr( target_os = "solaris" , link_name = "__link_xpg4" ) ]
898
897
pub fn link ( src : * const c_char , dst : * const c_char ) -> :: c_int ;
899
898
pub fn lseek ( fd : :: c_int , offset : off_t , whence : :: c_int ) -> off_t ;
900
899
pub fn pathconf ( path : * const c_char , name : :: c_int ) -> c_long ;
@@ -933,7 +932,10 @@ extern "C" {
933
932
all( target_os = "macos" , target_arch = "x86" ) ,
934
933
link_name = "ttyname_r$UNIX2003"
935
934
) ]
936
- #[ cfg_attr( target_os = "illumos" , link_name = "__posix_ttyname_r" ) ]
935
+ #[ cfg_attr(
936
+ any( target_os = "illumos" , target_os = "solaris" ) ,
937
+ link_name = "__posix_ttyname_r"
938
+ ) ]
937
939
pub fn ttyname_r ( fd : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
938
940
pub fn unlink ( c : * const c_char ) -> :: c_int ;
939
941
#[ cfg_attr(
@@ -1054,8 +1056,6 @@ extern "C" {
1054
1056
) ]
1055
1057
pub fn realpath ( pathname : * const :: c_char , resolved : * mut :: c_char ) -> * mut :: c_char ;
1056
1058
1057
- pub fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int ;
1058
-
1059
1059
#[ cfg_attr( target_os = "netbsd" , link_name = "__times13" ) ]
1060
1060
pub fn times ( buf : * mut :: tms ) -> :: clock_t ;
1061
1061
@@ -1356,6 +1356,7 @@ extern "C" {
1356
1356
#[ cfg_attr( target_os = "netbsd" , link_name = "__sigpending14" ) ]
1357
1357
pub fn sigpending ( set : * mut sigset_t ) -> :: c_int ;
1358
1358
1359
+ #[ cfg_attr( target_os = "solaris" , link_name = "__sysconf_xpg7" ) ]
1359
1360
pub fn sysconf ( name : :: c_int ) -> :: c_long ;
1360
1361
1361
1362
pub fn mkfifo ( path : * const c_char , mode : mode_t ) -> :: c_int ;
@@ -1426,10 +1427,15 @@ cfg_if! {
1426
1427
if #[ cfg( not( any( target_os = "emscripten" ,
1427
1428
target_os = "android" ,
1428
1429
target_os = "haiku" ,
1429
- target_os = "nto" ) ) ) ] {
1430
+ target_os = "nto" ,
1431
+ target_os = "solaris" ) ) ) ] {
1430
1432
extern "C" {
1431
1433
pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> :: c_int;
1432
1434
}
1435
+ } else if #[ cfg( target_os = "solaris" ) ] {
1436
+ extern "C" {
1437
+ pub fn adjtime( delta: * mut timeval, olddelta: * mut timeval) -> :: c_int;
1438
+ }
1433
1439
}
1434
1440
}
1435
1441
@@ -1451,6 +1457,14 @@ cfg_if! {
1451
1457
}
1452
1458
}
1453
1459
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
+
1454
1468
cfg_if ! {
1455
1469
if #[ cfg( not( any( target_env = "uclibc" , target_os = "nto" ) ) ) ] {
1456
1470
extern "C" {
0 commit comments