@@ -811,23 +811,7 @@ s! {
811
811
pub reserved: :: __u32,
812
812
}
813
813
814
- pub struct ptp_clock_caps {
815
- pub max_adj: :: c_int,
816
- pub n_alarm: :: c_int,
817
- pub n_ext_ts: :: c_int,
818
- pub n_per_out: :: c_int,
819
- pub pps: :: c_int,
820
- pub n_pins: :: c_int,
821
- pub cross_timestamping: :: c_int,
822
- #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
823
- pub adjust_phase: :: c_int,
824
- #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
825
- pub max_phase_adj: :: c_int,
826
- #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
827
- pub rsv: [ :: c_int; 11 ] ,
828
- #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ]
829
- pub rsv: [ :: c_int; 13 ] ,
830
- }
814
+
831
815
832
816
pub struct ptp_extts_request {
833
817
pub index: :: c_uint,
@@ -1087,6 +1071,52 @@ s! {
1087
1071
}
1088
1072
}
1089
1073
1074
+ cfg_if ! {
1075
+ if #[ cfg( any( target_arch = "sparc" , target_arch = "sparc64" ) ) ] {
1076
+ s!{
1077
+ pub struct ptp_clock_caps {
1078
+ pub max_adj: :: c_int,
1079
+ pub n_alarm: :: c_int,
1080
+ pub n_ext_ts: :: c_int,
1081
+ pub n_per_out: :: c_int,
1082
+ pub pps: :: c_int,
1083
+ pub n_pins: :: c_int,
1084
+ pub cross_timestamping: :: c_int,
1085
+ pub adjust_phase: :: c_int,
1086
+ pub rsv: [ :: c_int; 12 ] ,
1087
+ }
1088
+ }
1089
+ } else if #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ] {
1090
+ s!{
1091
+ pub struct ptp_clock_caps {
1092
+ pub max_adj: :: c_int,
1093
+ pub n_alarm: :: c_int,
1094
+ pub n_ext_ts: :: c_int,
1095
+ pub n_per_out: :: c_int,
1096
+ pub pps: :: c_int,
1097
+ pub n_pins: :: c_int,
1098
+ pub cross_timestamping: :: c_int,
1099
+ pub rsv: [ :: c_int; 13 ] ,
1100
+ }
1101
+ }
1102
+ } else {
1103
+ s! {
1104
+ pub struct ptp_clock_caps {
1105
+ pub max_adj: :: c_int,
1106
+ pub n_alarm: :: c_int,
1107
+ pub n_ext_ts: :: c_int,
1108
+ pub n_per_out: :: c_int,
1109
+ pub pps: :: c_int,
1110
+ pub n_pins: :: c_int,
1111
+ pub cross_timestamping: :: c_int,
1112
+ pub adjust_phase: :: c_int,
1113
+ pub max_phase_adj: :: c_int,
1114
+ pub rsv: [ :: c_int; 11 ] ,
1115
+ }
1116
+ }
1117
+ }
1118
+ }
1119
+
1090
1120
cfg_if ! {
1091
1121
if #[ cfg( not( target_arch = "sparc64" ) ) ] {
1092
1122
s!{
0 commit comments