No need to redefine values locally when available in header. linux/net_tstamp.h is available since Linux 2.6.30 while socket CAN was introduced in v2.6.25. These being old releases not maintained any more for many years, dropping support is acceptable. Regardless, candump already relies on some other macros defined in more recent kernel version (e.g. CAN_RAW_ERR_FILTER) meaning that it would not build on old linux kernel environments. Signed-off-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx> --- candump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/candump.c b/candump.c index 4abd2f6..8f0ca46 100644 --- a/candump.c +++ b/candump.c @@ -63,6 +63,7 @@ #include <linux/can.h> #include <linux/can/raw.h> +#include <linux/net_tstamp.h> #include "terminal.h" #include "lib.h" @@ -72,10 +73,6 @@ #define SO_TIMESTAMPING 37 #endif -/* from #include <linux/net_tstamp.h> - since Linux 2.6.30 */ -#define SOF_TIMESTAMPING_SOFTWARE (1 << 4) -#define SOF_TIMESTAMPING_RX_SOFTWARE (1 << 3) -#define SOF_TIMESTAMPING_RAW_HARDWARE (1 << 6) #define TIMESTAMPSZ 50 /* string 'absolute with date' requires max 49 bytes */ #define MAXSOCK 16 /* max. number of CAN interfaces given on the cmdline */ -- 2.37.4