Note that there are some explanatory texts on larger screens.

plurals
  1. POErrors in Linux Kernel headers
    primarykey
    data
    text
    <p>I'm trying to compile a library which includes some headers from kernel-devel package. I linked the appropriate headers, but now I get compilation errors in those header files.</p> <pre><code>/usr/include/asm-generic/bitops/fls64.h: In function ‘int fls64(__u64)’: /usr/include/asm-generic/bitops/fls64.h:10: error: ‘fls’ was not declared in this scope /usr/include/asm-generic/bitops/fls64.h:11: error: ‘fls’ was not declared in this scope </code></pre> <p>And, here are the code from asm-generic/bitops/fls64.h</p> <pre><code>#ifndef _ASM_GENERIC_BITOPS_FLS64_H_ #define _ASM_GENERIC_BITOPS_FLS64_H_ #include &lt;asm/types.h&gt; static inline int fls64(__u64 x) { __u32 h = x &gt;&gt; 32; if (h) return fls(h) + 32; return fls(x); } #endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */ </code></pre> <p>As you can notice "return fls(h)", there's no definition of fls(). I can resolve this by including "fls.h", but am I suppose to fix such errors in standard Kernel headers??</p> <p>Any pointers which could explain why is it this way and what can I do to get around such issues?? Btw, the errors I mentioned here are just the tip of the iceberg. There are a lot of such (delcaration missing) errors in multiple such headers.</p> <p>Help would be greatly appreciated. Thanks!</p> <p>rgds/R.</p> <p>PS: some system details:</p> <p>Linux Distribution: CentOS (5.5)</p> <pre><code>[raj@localhost common]$ uname -a Linux localhost.localdomain 2.6.18-238.9.1.el5 #1 SMP Tue Apr 12 18:10:56 EDT 2011 i686 i686 i386 GNU/Linux [raj@localhost common]$ cat /proc/version Linux version 2.6.18-238.9.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Tue Apr 12 18:10:56 EDT 2011 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload