On Tue, Mar 10, 2015 at 4:31 PM, Maxim Uvarov <[email protected]> wrote: > On 03/10/15 17:16, Ciprian Barbu wrote: >> >> On Tue, Mar 10, 2015 at 1:33 PM, Maxim Uvarov <[email protected]> >> wrote: >>> >>> Please also specify your env. I can not reproduce it with >>> ./cross-compile-test.sh >> >> I added some info in the bug entry. Were you able to reproduce like that? > > > I see that in one includes in net/if.h that structure is under ifdef > __USE_MISC, in other includes there is no such ifdef. > Looks like you have different version of headers. For linux/if.h there is no > ifdef for both cases. I think you patch is good to go, > tested it on my toolchains (compilation only).
This might be a problem with Ubuntu 13.10, I tested on an Ubuntu 14.04 and it works. The whole problem comes from the ioctl command that requires struct ifreq. From this man page (http://linux.die.net/man/7/netdevice) it looks like it should be enough to include <sys/ioctl.h> and <net/if.h>. I also found that including linux/if.h is usually done by code for kernel, so that might actually not be a good idea. Strange though, adding <sys/ioctl.h> doesn't fix compiling on my environment. Does anyone else run Ubuntu 13.10? maybe I screwed my headers somehow installing some packages ... > > Maxim. > > > >>> Maxim. >>> >>> >>> On 03/10/15 14:14, Maxim Uvarov wrote: >>>> >>>> Please add patch description and put bug link in the bottom of it. Like >>>> other git commits do. >>>> >>>> Thanks, >>>> Maxim. >>>> >>>> On 03/10/15 12:47, Ciprian Barbu wrote: >>>>> >>>>> Signed-off-by: Ciprian Barbu <[email protected]> >>>>> --- >>>>> fix for https://bugs.linaro.org/show_bug.cgi?id=1330 >>>>> >>>>> example/ipsec/odp_ipsec.c | 2 +- >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>> >>>>> diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c >>>>> index 98160ba..286b9f0 100644 >>>>> --- a/example/ipsec/odp_ipsec.c >>>>> +++ b/example/ipsec/odp_ipsec.c >>>>> @@ -30,7 +30,7 @@ >>>>> #include <stdbool.h> >>>>> #include <sys/socket.h> >>>>> -#include <net/if.h> >>>>> +#include <linux/if.h> >>>>> #include <sys/ioctl.h> >>>>> #include <sys/socket.h> >>>> >>>> >>> >>> _______________________________________________ >>> lng-odp mailing list >>> [email protected] >>> http://lists.linaro.org/mailman/listinfo/lng-odp > > _______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
