From 6e6c783bb4c5186ea9b94add7ee73a975d5c34f8 Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Mon, 14 May 2012 17:41:50 +0200 Subject: [PATCH] ring: make var const Signed-off-by: Daniel Borkmann --- src/ring.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/ring.h b/src/ring.h index 777e84e..fba876e 100644 --- a/src/ring.h +++ b/src/ring.h @@ -149,6 +149,23 @@ static inline void set_sockopt_fanout(int sock, unsigned int fanout_id, panic("No packet fanout support!\n"); } +#ifndef SO_TIMESTAMPING +# define SO_TIMESTAMPING 37 +# define SCM_TIMESTAMPING SO_TIMESTAMPING +#endif + +#ifndef SO_TIMESTAMPNS +# define SO_TIMESTAMPNS 35 +#endif + +#ifndef SIOCGSTAMPNS +# define SIOCGSTAMPNS 0x8907 +#endif + +#ifndef SIOCSHWTSTAMP +# define SIOCSHWTSTAMP 0x89b0 +#endif + #ifndef PACKET_TIMESTAMP enum { SOF_TIMESTAMPING_TX_HARDWARE = (1<<0), @@ -185,7 +202,7 @@ enum hwtstamp_rx_filters { # include #endif /* PACKET_TIMESTAMP */ -static inline void set_sockopt_hwtimestamp(int sock, char *dev) +static inline void set_sockopt_hwtimestamp(int sock, const char *dev) { int timesource, ret; struct hwtstamp_config hwconfig; -- 2.11.4.GIT