Skip to content

Commit c34fb06

Browse files
committed
deduplicate s! macro calls
1 parent fab755b commit c34fb06

File tree

1 file changed

+15
-17
lines changed
  • src/unix/linux_like/linux

1 file changed

+15
-17
lines changed

src/unix/linux_like/linux/mod.rs

+15-17
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,21 @@ s! {
10641064
pub get_args: __u16,
10651065
pub name: [c_char; ::IFNAMSIZ],
10661066
}
1067+
1068+
// linux/ptp_clock.h
1069+
pub struct ptp_sys_offset {
1070+
pub n_samples: ::c_uint,
1071+
pub rsv: [::c_uint; 3],
1072+
pub ts: [ptp_clock_time; 2 * PTP_MAX_SAMPLES as usize + 1],
1073+
}
1074+
1075+
pub struct ptp_pin_desc {
1076+
pub name: [::c_char; 64],
1077+
pub index: ::c_uint,
1078+
pub func: ::c_uint,
1079+
pub chan: ::c_uint,
1080+
pub rsv: [::c_uint; 5],
1081+
}
10671082
}
10681083

10691084
cfg_if! {
@@ -1247,23 +1262,6 @@ s_no_extra_traits! {
12471262
}
12481263
}
12491264

1250-
s! {
1251-
// linux/ptp_clock.h
1252-
pub struct ptp_sys_offset {
1253-
pub n_samples: ::c_uint,
1254-
pub rsv: [::c_uint; 3],
1255-
pub ts: [ptp_clock_time; 2 * PTP_MAX_SAMPLES as usize + 1],
1256-
}
1257-
1258-
pub struct ptp_pin_desc {
1259-
pub name: [::c_char; 64],
1260-
pub index: ::c_uint,
1261-
pub func: ::c_uint,
1262-
pub chan: ::c_uint,
1263-
pub rsv: [::c_uint; 5],
1264-
}
1265-
}
1266-
12671265
s_no_extra_traits! {
12681266
// linux/net_tstamp.h
12691267
#[allow(missing_debug_implementations)]

0 commit comments

Comments
 (0)