mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-01 11:26:39 +00:00
canutils/candump: guard SOF_TIMESTAMPING macros with ifndef
candump.c locally defines SOF_TIMESTAMPING_SOFTWARE, SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_RAW_HARDWARE. After nuttx added these macros to sys/socket.h, the build fails with -Werror=redefine. Wrap the local defines with #ifndef guards so they are only used when the system header does not provide them. Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
This commit is contained in:
parent
e3e3933138
commit
6e12c3de75
1 changed files with 6 additions and 0 deletions
|
|
@ -79,9 +79,15 @@
|
|||
#endif
|
||||
|
||||
/* from #include <linux/net_tstamp.h> - since Linux 2.6.30 */
|
||||
#ifndef SOF_TIMESTAMPING_SOFTWARE
|
||||
#define SOF_TIMESTAMPING_SOFTWARE (1<<4)
|
||||
#endif
|
||||
#ifndef SOF_TIMESTAMPING_RX_SOFTWARE
|
||||
#define SOF_TIMESTAMPING_RX_SOFTWARE (1<<3)
|
||||
#endif
|
||||
#ifndef SOF_TIMESTAMPING_RAW_HARDWARE
|
||||
#define SOF_TIMESTAMPING_RAW_HARDWARE (1<<6)
|
||||
#endif
|
||||
|
||||
#define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */
|
||||
#define MAXIFNAMES 30 /* size of receive name index to omit ioctls */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue