Skip to content
  • Alan Maguire's avatar
    fe937ea1
    selftests/bpf: fix compilation error for flow_dissector.c · fe937ea1
    Alan Maguire authored
    
    
    When building the tools/testing/selftest/bpf subdirectory,
    (running both a local directory "make" and a
    "make -C tools/testing/selftests/bpf") I keep hitting the
    following compilation error:
    
    prog_tests/flow_dissector.c: In function ‘create_tap’:
    prog_tests/flow_dissector.c:150:38: error: ‘IFF_NAPI’ undeclared (first
    use in this function)
       .ifr_flags = IFF_TAP | IFF_NO_PI | IFF_NAPI | IFF_NAPI_FRAGS,
                                          ^
    prog_tests/flow_dissector.c:150:38: note: each undeclared identifier is
    reported only once for each function it appears in
    prog_tests/flow_dissector.c:150:49: error: ‘IFF_NAPI_FRAGS’ undeclared
    
    Adding include/uapi/linux/if_tun.h to tools/include/uapi/linux
    resolves the problem and ensures the compilation of the file
    does not depend on having up-to-date kernel headers locally.
    
    Signed-off-by: default avatarAlan Maguire <alan.maguire@oracle.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    fe937ea1
    selftests/bpf: fix compilation error for flow_dissector.c
    Alan Maguire authored
    
    
    When building the tools/testing/selftest/bpf subdirectory,
    (running both a local directory "make" and a
    "make -C tools/testing/selftests/bpf") I keep hitting the
    following compilation error:
    
    prog_tests/flow_dissector.c: In function ‘create_tap’:
    prog_tests/flow_dissector.c:150:38: error: ‘IFF_NAPI’ undeclared (first
    use in this function)
       .ifr_flags = IFF_TAP | IFF_NO_PI | IFF_NAPI | IFF_NAPI_FRAGS,
                                          ^
    prog_tests/flow_dissector.c:150:38: note: each undeclared identifier is
    reported only once for each function it appears in
    prog_tests/flow_dissector.c:150:49: error: ‘IFF_NAPI_FRAGS’ undeclared
    
    Adding include/uapi/linux/if_tun.h to tools/include/uapi/linux
    resolves the problem and ensures the compilation of the file
    does not depend on having up-to-date kernel headers locally.
    
    Signed-off-by: default avatarAlan Maguire <alan.maguire@oracle.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Loading