On Mon, Sep 17, 2018 at 03:43:01PM +0000, FUSTE Emmanuel wrote: > diff --git a/phc.h b/phc.h > index 154e35e..2fe33c4 100644 > --- a/phc.h > +++ b/phc.h
The diff does not apply (using git am) to the current master. Can you please clean it up and re-submit? Thanks, Richard > @@ -21,6 +21,19 @@ > > #include "missing.h" > > +/* from linux kernel v4.15 */ > +struct compat_caps { > + int max_adj; /* Maximum frequency adjustment in parts per billon. > */ > + int n_alarm; /* Number of programmable alarms. */ > + int n_ext_ts; /* Number of external time stamp channels. */ > + int n_per_out; /* Number of programmable periodic signals. */ > + int pps; /* Whether the clock supports a PPS callback. */ > + int n_pins; /* Number of input/output pins. */ > + /* Whether the clock supports precise system-device cross timestamps > */ > + int cross_timestamping; > + int rsv[13]; /* Reserved for future use. */ > +}; > + > /** > * Opens a PTP hardware clock device. > * > diff --git a/phc_ctl.c b/phc_ctl.c > index 4a78a19..d33ff1f 100644 > --- a/phc_ctl.c > +++ b/phc_ctl.c > @@ -334,14 +334,17 @@ static int do_freq(clockid_t clkid, int cmdc, char > *cmdv[]) > > static int do_caps(clockid_t clkid, int cmdc, char *cmdv[]) > { > - struct ptp_clock_caps caps; > + union { > + struct ptp_clock_caps caps; > + struct compat_caps compat; > + } u; > > if (clkid == CLOCK_REALTIME) { > pr_warning("CLOCK_REALTIME is not a PHC device."); > return 0; > } > > - if (ioctl(CLOCKID_TO_FD(clkid), PTP_CLOCK_GETCAPS, &caps)) { > + if (ioctl(CLOCKID_TO_FD(clkid), PTP_CLOCK_GETCAPS, &u)) { > pr_err("get capabilities failed: %s", > strerror(errno)); > return -1; > @@ -353,12 +356,14 @@ static int do_caps(clockid_t clkid, int cmdc, char > *cmdv[]) > " %d programable alarms\n" > " %d external time stamp channels\n" > " %d programmable periodic signals\n" > - " %s pulse per second support", > - caps.max_adj, > - caps.n_alarm, > - caps.n_ext_ts, > - caps.n_per_out, > - caps.pps ? "has" : "doesn't have"); > + " %s pulse per second support\n" > + " %s precise system-device cross timestamps support", > + u.caps.max_adj, > + u.caps.n_alarm, > + u.caps.n_ext_ts, > + u.caps.n_per_out, > + u.caps.pps ? "has" : "doesn't have", > + u.compat.cross_timestamping ? "has" : "doesn't have"); > return 0; > } > _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel