ptpd: Fix reserved word 'class'
When ptpd.h is included in C++ code, the use of identifier 'class' caused a compilation error. Changed to "clockclass".
This commit is contained in:
parent
9abc82c792
commit
fcd0729e21
@ -48,7 +48,7 @@ struct ptpd_status_s
|
||||
uint8_t id[8]; /* Clock identity */
|
||||
int utcoffset; /* Offset between clock time and UTC time (seconds) */
|
||||
int priority1; /* Main priority field */
|
||||
int class; /* Clock class (IEEE-1588, lower is better) */
|
||||
int clockclass; /* Clock class (IEEE-1588, lower is better) */
|
||||
int accuracy; /* Clock accuracy (IEEE-1588, lower is better) */
|
||||
int variance; /* Clock variance (IEEE-1588, lower is better) */
|
||||
int priority2; /* Secondary priority field */
|
||||
|
@ -1342,7 +1342,7 @@ static void ptp_process_statusreq(FAR struct ptp_state_s *state)
|
||||
status->clock_source_info.utcoffset =
|
||||
(int16_t)(((uint16_t)s->utcoffset[0] << 8) | s->utcoffset[1]);
|
||||
status->clock_source_info.priority1 = s->gm_priority1;
|
||||
status->clock_source_info.class = s->gm_quality[0];
|
||||
status->clock_source_info.clockclass = s->gm_quality[0];
|
||||
status->clock_source_info.accuracy = s->gm_quality[1];
|
||||
status->clock_source_info.priority2 = s->gm_priority2;
|
||||
status->clock_source_info.variance =
|
||||
|
@ -77,7 +77,7 @@ static int do_ptpd_status(int pid)
|
||||
|
||||
printf("|- utcoffset: %d\n", status.clock_source_info.utcoffset);
|
||||
printf("|- priority1: %d\n", status.clock_source_info.priority1);
|
||||
printf("|- class: %d\n", status.clock_source_info.class);
|
||||
printf("|- class: %d\n", status.clock_source_info.clockclass);
|
||||
printf("|- accuracy: %d\n", status.clock_source_info.accuracy);
|
||||
printf("|- variance: %d\n", status.clock_source_info.variance);
|
||||
printf("|- priority2: %d\n", status.clock_source_info.priority2);
|
||||
|
Loading…
Reference in New Issue
Block a user