[Toybox] [PATCH] ip: add missing linux/ip.h header for struct iphdr declaration
rob at landley.net
Tue Jul 7 02:36:47 PDT 2020
On 7/5/20 12:24 PM, ariadne at dereferenced.org wrote:
> In Alpine, we are using Linux 5.4 kernel headers. It is probably a regression
> in the headers, but including the header anyway likely makes sense.
> I think glibc and bionic do not use kernel headers directly.
$ find /usr/include -type f | egrep -v '/(linux|asm|asm-generic)/' | xargs grep
'#include <linux/' | wc -l
Although in this case, devuan ascii's /usr/include/linux/if_tunnel.h #includes
linux/ip.h. Let's see, in current kernel sources...
$ git annotate include/uapi/linux/if_tunnel.h | grep ip.h
1fe8e0f074c77 (Mikko Rapeli 2016-08-22 20:32:39 +0200 7)#include <linux/ip.h>
Author: Mikko Rapeli <mikko.rapeli at iki.fi>
Date: Mon Aug 22 20:32:39 2016 +0200
include/uapi/linux/if_tunnel.h: include linux/if.h, linux/ip.h and linux/in6.h
Fixes userspace compilation errors like:
error: field ‘iph’ has incomplete type
error: field ‘prefix’ has incomplete type
Signed-off-by: Mikko Rapeli <mikko.rapeli at iki.fi>
Signed-off-by: David S. Miller <davem at davemloft.net>
So this is a bug that was fixed in upstream kernel sources 4 years ago
(v4.8-rc3), and the 5.4 kernel was released November 24, 2019.
Are you sure you're using 5.4 kernel headers?
More information about the Toybox