Hi Andrew,
I suspect Dropbear itself needs fixing, your workaround sounds fine for now.
The configure script should probably just test for HAVE_LINUX_TYPES_H or
similar and the required #defines. I'll look at it.
Cheers,
Matt
#ifdef SO_PRIORITY
#include
#include
#endif
> On Tue 26/7/2016, at 7:20 pm, Andrew Bainbridge wrote:
>
> Andrew Bainbridge microsoft.com> writes:
>
> My embedded device is running Linux 3.4.0. I couldn't find
> a package of kernel 3.4.0 kernel headers available on
> Raspbian package manager, so I installed the nearest, which
> was linux-headers-3.6-trunk-rpi. Already, I can see myself
> falling into a rabbit hole.
>
> Then I found lots more compile errors failing to find more
> headers. So I ended up with an include path like this:
>
> export CFLAGS="-I ../zlib-1.2.8 -I /usr/src/linux-headers-3.6
> -trunk-common/include -I /usr/src/linux-headers-3.6-trunk-
> common/arch/arm/include -I /usr/include/arm-linux-gnueabihf"
>
> But then I end up with a error message from line 30 of
> /usr/include/arm-linux-gnueabihf/bits/types.h. The compiler
> complains about the keyword "typedef". The previous line was
> #include , so presumably that file left the
> compiler in a bad state.
>
> At this point I gave up and removed #includes of
> linux/types.h and linux/pkt_sched.h from dropbear's
> includes.h. Then the only thing that failed to compile was a
> couple of places that wanted definitions of
> TC_PRIO_INTERACTIVE_BULK and TC_PRIO_INTERACTIVE. Grepping
> the 3.6 kernel headers I installed, I saw that they are
> defined as 4 and 6 respectively, so I just pasted those
> values in as literals. This is entirely not cool. I'm
> ashamed. However, the code now compiles and works on the
> embedded device.
>
> I guess me learning how to cross compile properly is
> off-topic for this mailing list.
>