wenquan2015 opened a new pull request, #3788:
URL: https://github.com/apache/nuttx-apps/pull/3788
Summary
candump.c locally defines SOF_TIMESTAMPING_SOFTWARE,
SOF_TIMESTAMPING_RX_SOFTWARE and SOF_TIMESTAMPING_RAW_HARDWARE for use with CAN
socket timestamping. After apache/nuttx#20161
(https://github.com/apache/nuttx/pull/20161) added these macros to sys/socket.h
as
part of the SO_TIMESTAMPING support, the build fails with -Werror=redefine:
candump.c:82: error: "SOF_TIMESTAMPING_SOFTWARE" redefined [-Werror]
/nuttx/include/sys/socket.h:240: note: this is the location of the
previous definition
Wrap the local defines with #ifndef guards so they are only used when the
system header does not provide them.
Impact
No behavioral change. The same macro values are used regardless of whether
they come from the system header or the local fallback
definitions.
This is a companion fix for apache/nuttx#20161
(https://github.com/apache/nuttx/pull/20161) (net: add SO_TIMESTAMPING support
for
PKT sockets). Both PRs should be merged together.
Testing
Build: sim:can with CONFIG_NET_TIMESTAMP=y
Before: build fails with -Werror=redefine on SOF_TIMESTAMPING_SOFTWARE and
SOF_TIMESTAMPING_RAW_HARDWARE.
After: build succeeds, no warnings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]