Skip to content

Commit 865ba96

Browse files
mhofstettersayboras
authored andcommitted
socket_options: prevent direct import of private header linux/in.h
This commit suppresses the warning to import the private header `linux/in(6).h` directly. Otherwise this leads to the following clangd error. ``` Redefinition of struct in6_addr ``` Signed-off-by: Marco Hofstetter <[email protected]>
1 parent 0949ac7 commit 865ba96

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.clangd

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Index:
44
Diagnostics:
55
UnusedIncludes: Strict
66
MissingIncludes: Strict
7+
Includes:
8+
IgnoreHeader:
9+
- "linux/in\\.h"
10+
- "linux/in6\\.h"
711
# CompileFlags:
812
# CompilationDatabase: ./compile_commands.json
913
# # Unfortunately, above config isn't working as expected.

cilium/socket_option.h

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
22

33
#include <asm-generic/socket.h>
4-
#include <linux/in.h>
5-
#include <linux/in6.h>
64
#include <netinet/in.h>
75

86
#include <cerrno>

0 commit comments

Comments
 (0)