lkml.org 
[lkml]   [2020]   [Jul]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] uapi, seg6_iptunnel: Add missing include in seg6_iptunnel.h
Date
From: Ioana-Ruxandra Stăncioi <stancioi@google.com>

Include <linux/ipv6.h> in uapi/linux/seg6_iptunnel.h to fix the
following linux/seg6_iptunnel.h compilation error:

invalid application of 'sizeof' to incomplete type 'struct ipv6hdr'
head = sizeof(struct ipv6hdr);
^~~~~~

This is to allow including this header in places where <linux/ipv6.h>
has not been included but __KERNEL__ is defined. In the kernel the easy
workaround is including <linux/ipv6.h>, but the header may also be used
by code analysis tools.

Signed-off-by: Ioana-Ruxandra Stăncioi <stancioi@google.com>
---
include/uapi/linux/seg6_iptunnel.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/seg6_iptunnel.h b/include/uapi/linux/seg6_iptunnel.h
index 09fb608a35ec..b904228f463c 100644
--- a/include/uapi/linux/seg6_iptunnel.h
+++ b/include/uapi/linux/seg6_iptunnel.h
@@ -38,6 +38,7 @@ enum {
};

#ifdef __KERNEL__
+#include <linux/ipv6.h>

static inline size_t seg6_lwt_headroom(struct seg6_iptunnel_encap *tuninfo)
{
--
2.28.0.rc0.142.g3c755180ce-goog
\
 
 \ /
  Last update: 2020-07-29 12:52    [W:0.036 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site