selftests: bpf: fix compiler warning in flow_dissector test
authorAlakesh Haloi <alakesh.haloi@gmail.com>
Tue, 28 May 2019 19:02:18 +0000 (19:02 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 29 May 2019 13:23:40 +0000 (15:23 +0200)
Add missing header file following compiler warning:

  prog_tests/flow_dissector.c: In function ‘tx_tap’:
  prog_tests/flow_dissector.c:175:9: warning: implicit declaration of function ‘writev’; did you mean ‘write’? [-Wimplicit-function-declaration]
    return writev(fd, iov, ARRAY_SIZE(iov));
           ^~~~~~
           write

Fixes: 0905beec9f52 ("selftests/bpf: run flow dissector tests in skb-less mode")
Signed-off-by: Alakesh Haloi <alakesh.haloi@gmail.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/prog_tests/flow_dissector.c

index fbd1d88a6095325a5273f21b86ec88eae91d8994..c938283ac232a8bd1879af0a7e6e8c5de3b3169d 100644 (file)
@@ -3,6 +3,7 @@
 #include <error.h>
 #include <linux/if.h>
 #include <linux/if_tun.h>
+#include <sys/uio.h>
 
 #define CHECK_FLOW_KEYS(desc, got, expected)                           \
        CHECK_ATTR(memcmp(&got, &expected, sizeof(got)) != 0,           \