Skip to content

Commit cf84cec

Browse files
committedAug 31, 2024
uglier version of ptp_clock_caps
1 parent 69e5eef commit cf84cec

File tree

1 file changed

+29
-44
lines changed
  • src/unix/linux_like/linux

1 file changed

+29
-44
lines changed
 

‎src/unix/linux_like/linux/mod.rs

+29-44
Original file line numberDiff line numberDiff line change
@@ -1069,51 +1069,36 @@ s! {
10691069
pub chan: ::c_uint,
10701070
pub rsv: [::c_uint; 5],
10711071
}
1072-
}
10731072

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-
}
1073+
pub struct ptp_clock_caps {
1074+
pub max_adj: ::c_int,
1075+
pub n_alarm: ::c_int,
1076+
pub n_ext_ts: ::c_int,
1077+
pub n_per_out: ::c_int,
1078+
pub pps: ::c_int,
1079+
pub n_pins: ::c_int,
1080+
pub cross_timestamping: ::c_int,
1081+
#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))]
1082+
pub adjust_phase: ::c_int,
1083+
#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))]
1084+
pub rsv: [::c_int; 12],
1085+
#[cfg(any(target_env = "musl", target_env = "ohos"))]
1086+
pub rsv: [::c_int; 13],
1087+
#[cfg(not(any(
1088+
any(target_arch = "sparc", target_arch = "sparc64"),
1089+
any(target_env = "musl", target_env = "ohos"),
1090+
)))]
1091+
pub adjust_phase: ::c_int,
1092+
#[cfg(not(any(
1093+
any(target_arch = "sparc", target_arch = "sparc64"),
1094+
any(target_env = "musl", target_env = "ohos"),
1095+
)))]
1096+
pub max_phase_adj: ::c_int,
1097+
#[cfg(not(any(
1098+
any(target_arch = "sparc", target_arch = "sparc64"),
1099+
any(target_env = "musl", target_env = "ohos"),
1100+
)))]
1101+
pub rsv: [::c_int; 11],
11171102
}
11181103
}
11191104

0 commit comments

Comments
 (0)