From 296fb3f046d5528b90d8b3a73e99075b1113a355 Mon Sep 17 00:00:00 2001 From: Sergey Chang Date: Thu, 5 Dec 2019 02:15:00 -0500 Subject: [PATCH] packetdrill: fix 'error: SIOCGSTAMP undeclared' Errors in some distributions looked like: cc -g -Wall -Werror -c -o packet_socket_linux.o packet_socket_linux.c packet_socket_linux.c: In function `packet_socket_setup': packet_socket_linux.c:100:26: error: `SIOCGSTAMP' undeclared (first use in this function) ioctl(psock->packet_fd, SIOCGSTAMP, &tv); ^ packet_socket_linux.c:100:26: note: each undeclared identifier is reported only once for each function it appears in packet_socket_linux.c: In function `packet_socket_receive': packet_socket_linux.c:270:30: error: `SIOCGSTAMP' undeclared (first use in this function) if (ioctl(psock->packet_fd, SIOCGSTAMP, &tv) < 0) ^ Signed-off-by: Sergey Chang --- gtests/net/packetdrill/packet_socket_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gtests/net/packetdrill/packet_socket_linux.c b/gtests/net/packetdrill/packet_socket_linux.c index a1f49e23..36655724 100644 --- a/gtests/net/packetdrill/packet_socket_linux.c +++ b/gtests/net/packetdrill/packet_socket_linux.c @@ -36,6 +36,7 @@ #include #include +#include #include "assert.h" #include "ethernet.h"