Fatal Error Asm/bitops.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to include kernel headers in a program up vote 0 down vote favorite 1 I am writing a libnetfilter_queue program. I am new to linux kernel programming. I need to include linux/skbuff.h, net/checksum.h and many related kernel headers which are not present in /usr/include/linux. I get following error on compilation fatal error: linux/skbuff.h: No such file or directory fatal error: net/checksum.h: No such file or directory c linux network-programming linux-kernel header-files share|improve this question edited Oct 15 '12 at 16:46 asked Oct 15 '12 at 14:45 adnan kamili 2,44711341 I guess if you installed them, a -I/usr/include/linux should work... How did you installed your kernel's headers? –shkschneider Oct 15 '12 at 14:47 i use ubuntu 12.04, the following package is already installed linux-headers-3.2.0-32 –adnan kamili Oct 15 '12 at 14:50 You probably only need the kernel headers if you are compiling a kernel module; in that case your module & kernel specific makefile should deal with that. –Basile Starynkevitch Oct 15 '12 at 17:05 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote accepted try this find / -name skbuff.h 2>/dev/null then when it finds the location use the -I/path/to/folder when you compile your program.. If it doesn't find the header you don't have it! share|improve this answer answered Oct 15 '12 at 14:48 pyCthon 3,06473275 find /usr [...] should be enough ^^ –shkschneider Oct 15 '12 at 14:51 I added the path /usr/src/linux-headers-3.2.0-32/include/ but i get following error : /usr/src/linux-headers-3.2.0-32/include/linux/bitops.h:22:24: fatal error: asm/bitops.h: No such file or directory –adnan kamili Oct 15 '12 at 16:13 do you know how to add a directory to your path? –pyCthon Oct 15 '12 at 16:23 g++ -Wall -I /usr/src/linux-headers-3.2.0-32/include/ -o filter -lnetfilter_queue –adnan kamili Oct 15 '12 at 16:42 1 thats a no, type $PATH in terminal copy paste that then go to your home directory and type vi .bashrc add what your copied a
Computing Tutorials Open Source Pro LearnWhat is Linux? Training Certification Events Webinars CommunityParticipate Q&A Forums Blogs ResourcesNewsletter Distributions Publications Infographics Photos Videos Jobs kutchronic October 4, 2010 error: asm/bitops.h: No such file or directory Hi, I am trying to compile a file named process_30sec.c(thats a C program) through the Ubuntu terminal and it is showing the following error in command terminal:process_30sec.c:15:23: error: asm/bitops.h: No such file or directory I have just started using Ubuntu&Linux so I am not familiar with lots of http://stackoverflow.com/questions/12898107/how-to-include-kernel-headers-in-a-program commands and things going around. I am using the following command to compile the process_30sec.c file:kutub@ubuntu:~/Desktop$ gcc process_30sec.c The above mentioned program file contains a header file , that I need to use in the program. It seems that this header file is not recognized by the system, and it needs to be included somewhere in the system so https://www.linux.com/answers/error-asmbitopsh-no-such-file-or-directory that the terminal would allow me to compile this program. Please suggests what to do?? Thanks!! Internet Print This Like (0 likes) mfillpot | November 30, 2010 Have you found a resolution to this issue yet? Have you found a resolution to this issue yet? Like (0 likes) mfillpot | October 4, 2010 On my system I am seeing the necessary file in /usr/include/ext2fs/bitops.h,... On my system I am seeing the necessary file in /usr/include/ext2fs/bitops.h, it was installed as part of the e2fsprogs package. In addition there are several files that came by that name in the kernel source, you can install the kernel source by typing "sudo apt-get install linux-kernel-devel" into the terminal. Like (0 likes) JohnVV | October 4, 2010 PLEASE READ your fourm post at Linuxquestions ... PLEASE READ your fourm post at Linuxquestions http://www.linuxquestions.org/questions/linux-newbie-8/error-asm-bitops-... you posted this there also and why are you building software IN THE DESKTOP folder Like (0 likes) Your Answer Login or register to post an answer Click Here! Advertisement Training See all LFD450 Embedded Linux Dev
1 /* 2 * Copyright 1995, Russell King. 3 * Various bits and pieces copyrights include: 4 * Linus Torvalds (test_bit). 5 * Big endian support: Copyright 2001, Nicolas Pitre 6 * reworked by rmk. 7 * 8 * bit http://lxr.free-electrons.com/source/arch/arm/include/asm/bitops.h 0 is the LSB of an "unsigned long" quantity. 9 * 10 * Please note that the code in this file should never be included 11 * from user space. Many of these are not implemented in assembler 12 * since they would be too costly. Also, they require privileged 13 * instructions (which are not available from fatal error user mode) to ensure 14 * that they are atomic. 15 */ 16 17 #ifndef __ASM_ARM_BITOPS_H 18 #define __ASM_ARM_BITOPS_H 19 20 #ifdef __KERNEL__ 21 22 #ifndef _LINUX_BITOPS_H 23 #error only