Skip to content

Commit

Permalink
packetdrill: fix 'error: SIOCGSTAMP undeclared'
Browse files Browse the repository at this point in the history
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 <sergeychang@gmail.com>
  • Loading branch information
Jancd authored and nealcardwell committed Jan 16, 2020
1 parent fd18ca6 commit 296fb3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gtests/net/packetdrill/packet_socket_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#include <netpacket/packet.h>
#include <linux/filter.h>
#include <linux/sockios.h>

#include "assert.h"
#include "ethernet.h"
Expand Down

0 comments on commit 296fb3f

Please sign in to comment.