Re: [PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Daniel Borkmann
On 6/9/20 11:16 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 09, 2020 at 10:37:48PM +0200, Daniel Borkmann escreveu: Hey Arnaldo, On 6/9/20 5:34 PM, Arnaldo Carvalho de Melo wrote: Some systems, such as Android, don't have a define for __WORDSIZE, do it in terms of __SIZEOF_LONG__, as done

Re: [PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Arnaldo Carvalho de Melo
Em Tue, Jun 09, 2020 at 10:37:48PM +0200, Daniel Borkmann escreveu: > Hey Arnaldo, > > On 6/9/20 5:34 PM, Arnaldo Carvalho de Melo wrote: > > Some systems, such as Android, don't have a define for __WORDSIZE, do it > > in terms of __SIZEOF_LONG__, as done in perf since 2012: > > > >

Re: [PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Daniel Borkmann
Hey Arnaldo, On 6/9/20 5:34 PM, Arnaldo Carvalho de Melo wrote: Some systems, such as Android, don't have a define for __WORDSIZE, do it in terms of __SIZEOF_LONG__, as done in perf since 2012: http://git.kernel.org/torvalds/c/3f34f6c0233ae055b5 For reference:

[PATCH] libbpf: Define __WORDSIZE if not available

2020-06-09 Thread Arnaldo Carvalho de Melo
Some systems, such as Android, don't have a define for __WORDSIZE, do it in terms of __SIZEOF_LONG__, as done in perf since 2012: http://git.kernel.org/torvalds/c/3f34f6c0233ae055b5 For reference: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html I build tested it here and