Greetings,
I was trying to compile linuxptp from newest source (repo cloned today) and i
got following error:
arm-linux-gcc -Wall -DVER=3.1-00176-ga115563-dirty -D_GNU_SOURCE
-DHAVE_CLOCK_ADJTIME -DHAVE_POSIX_SPAWN -DHAVE_ONESTEP_SYNC -c -o tlv.o tlv.c
tlv.c: In function ‘mgt_post_recv’:
tlv.c:374:3: error: ‘for’ loop initial declarations are only allowed in C99 or
C11 mode
for (int i = 0; i < umtn->actual_table_size; i++) {
^
tlv.c:374:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to
compile your code
tlv.c: In function ‘mgt_pre_send’:
tlv.c:551:3: error: ‘for’ loop initial declarations are only allowed in C99 or
C11 mode
for (int i = 0; i < umtn->actual_table_size; i++) {
^
I am using arm-linux-gcc version 4.9.4.
Enforcing C99/C11 by adding flag from the warning fixes the issue on this
compiler.
I leave that to you whether you prefer enforcing C99/C11 or older compilers
compliance.
Best regards
Jakub Raczynski
_______________________________________________
Linuxptp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-users