@@ -314,9 +314,19 @@ pub const ATF_PUBL: ::c_int = 0x08;
314
314
pub const ATF_USETRAILERS : :: c_int = 0x10 ;
315
315
316
316
pub const FNM_PERIOD : c_int = 1 << 2 ;
317
- pub const FNM_CASEFOLD : c_int = 1 << 4 ;
318
317
pub const FNM_NOMATCH : c_int = 1 ;
319
318
319
+ cfg_if ! {
320
+ if #[ cfg( any(
321
+ target_os = "illumos" ,
322
+ target_os = "solaris" ,
323
+ ) ) ] {
324
+ pub const FNM_CASEFOLD : c_int = 1 << 3 ;
325
+ } else {
326
+ pub const FNM_CASEFOLD : c_int = 1 << 4 ;
327
+ }
328
+ }
329
+
320
330
cfg_if ! {
321
331
if #[ cfg( any(
322
332
target_os = "macos" ,
@@ -622,10 +632,8 @@ extern "C" {
622
632
target_vendor = "nintendo"
623
633
) ) ) ]
624
634
#[ 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
- ) ]
635
+ #[ cfg_attr( target_os = "illumos" , link_name = "__xnet_socket" ) ]
636
+ #[ cfg_attr( target_os = "solaris" , link_name = "__xnet7_socket" ) ]
629
637
#[ cfg_attr( target_os = "espidf" , link_name = "lwip_socket" ) ]
630
638
pub fn socket ( domain : :: c_int , ty : :: c_int , protocol : :: c_int ) -> :: c_int ;
631
639
#[ cfg( not( all(
@@ -931,6 +939,7 @@ extern "C" {
931
939
pub fn getppid ( ) -> pid_t ;
932
940
pub fn getuid ( ) -> uid_t ;
933
941
pub fn isatty ( fd : :: c_int ) -> :: c_int ;
942
+ #[ cfg_attr( target_os = "solaris" , link_name = "__link_xpg4" ) ]
934
943
pub fn link ( src : * const c_char , dst : * const c_char ) -> :: c_int ;
935
944
pub fn lseek ( fd : :: c_int , offset : off_t , whence : :: c_int ) -> off_t ;
936
945
pub fn pathconf ( path : * const c_char , name : :: c_int ) -> c_long ;
@@ -968,7 +977,10 @@ extern "C" {
968
977
all( target_os = "macos" , target_arch = "x86" ) ,
969
978
link_name = "ttyname_r$UNIX2003"
970
979
) ]
971
- #[ cfg_attr( target_os = "illumos" , link_name = "__posix_ttyname_r" ) ]
980
+ #[ cfg_attr(
981
+ any( target_os = "illumos" , target_os = "solaris" ) ,
982
+ link_name = "__posix_ttyname_r"
983
+ ) ]
972
984
pub fn ttyname_r ( fd : :: c_int , buf : * mut c_char , buflen : :: size_t ) -> :: c_int ;
973
985
pub fn unlink ( c : * const c_char ) -> :: c_int ;
974
986
#[ cfg_attr(
@@ -1089,8 +1101,6 @@ extern "C" {
1089
1101
) ]
1090
1102
pub fn realpath ( pathname : * const :: c_char , resolved : * mut :: c_char ) -> * mut :: c_char ;
1091
1103
1092
- pub fn flock ( fd : :: c_int , operation : :: c_int ) -> :: c_int ;
1093
-
1094
1104
#[ cfg_attr( target_os = "netbsd" , link_name = "__times13" ) ]
1095
1105
pub fn times ( buf : * mut :: tms ) -> :: clock_t ;
1096
1106
@@ -1399,6 +1409,7 @@ extern "C" {
1399
1409
#[ cfg_attr( target_os = "netbsd" , link_name = "__sigpending14" ) ]
1400
1410
pub fn sigpending ( set : * mut sigset_t ) -> :: c_int ;
1401
1411
1412
+ #[ cfg_attr( target_os = "solaris" , link_name = "__sysconf_xpg7" ) ]
1402
1413
pub fn sysconf ( name : :: c_int ) -> :: c_long ;
1403
1414
1404
1415
pub fn mkfifo ( path : * const c_char , mode : mode_t ) -> :: c_int ;
@@ -1452,10 +1463,15 @@ cfg_if! {
1452
1463
if #[ cfg( not( any( target_os = "emscripten" ,
1453
1464
target_os = "android" ,
1454
1465
target_os = "haiku" ,
1455
- target_os = "nto" ) ) ) ] {
1466
+ target_os = "nto" ,
1467
+ target_os = "solaris" ) ) ) ] {
1456
1468
extern "C" {
1457
1469
pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> :: c_int;
1458
1470
}
1471
+ } else if #[ cfg( target_os = "solaris" ) ] {
1472
+ extern "C" {
1473
+ pub fn adjtime( delta: * mut timeval, olddelta: * mut timeval) -> :: c_int;
1474
+ }
1459
1475
}
1460
1476
}
1461
1477
@@ -1477,6 +1493,14 @@ cfg_if! {
1477
1493
}
1478
1494
}
1479
1495
1496
+ cfg_if ! {
1497
+ if #[ cfg( not( target_os = "solaris" ) ) ] {
1498
+ extern "C" {
1499
+ pub fn flock( fd: :: c_int, operation: :: c_int) -> :: c_int;
1500
+ }
1501
+ }
1502
+ }
1503
+
1480
1504
cfg_if ! {
1481
1505
if #[ cfg( not( any( target_env = "uclibc" , target_os = "nto" ) ) ) ] {
1482
1506
extern "C" {
0 commit comments