Error Asm/bitops.h
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 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 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
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 http://lxr.free-electrons.com/source/arch/arm/include/asm/bitops.h 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 http://stackoverflow.com/questions/12898107/how-to-include-kernel-headers-in-a-program 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,44211341 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,06473274 find /usr [...] should be enough ^^ –shkschneider Oct 15 '12 at 14:51 I added the path /usr/src/linux-headers
instructions: Windows Mac Red Hat Linux Ubuntu Click URL instructions: Right-click on ad, choose "Copy Link", then paste here → (This may not be possible with some types of ads) More information about https://sourceforge.net/p/sd4l/mailman/message/28265035/ our ad policies X You seem to have CSS turned off. Please don't fill out this field. You seem to have CSS turned off. Please don't fill out this field. Briefly describe the http://forum.ubuntu-it.org/viewtopic.php?t=470899 problem (required): Upload screenshot of ad (required): Select a file, or drag & drop file here. ✔ ✘ Please provide the ad click URL, if possible: Home Browse ScramDisk 4 Linux Mailing Lists error asm/bitops.h ScramDisk 4 Linux Brought to you by: argonavis, huj Summary Files Reviews Support Wiki Mailing Lists Tickets ▾ Bugs Support Requests Feature Requests News Code sd4l-announce sd4l-devel sd4l-user Re: [SD4L-user] Compiling on kernel 3.0.0.12 Re: [SD4L-user] Compiling on kernel 3.0.0.12 From: Jonathan Coles
senza risposta • Discussioni attive Modifica la dimensione del carattere Stampa pagina [driver] problema compilazione Linguaggi di programmazione: php, perl, python, C, bash, ecc. Rispondi al messaggio 9 messaggi • Pagina 1 di 1 Rispondi citando [driver] problema compilazione da bigboss1984 » venerdì 8 luglio 2011, 16:43 ciao a tutti, per un esame che dovrei sostenere dovrei compilare un driver fatto da me, nella traccia c'è scritto di compilare con :gcc -c -I/usr/src/linux/include -DMODULE -D__KERNEL__ -o miodriver.oio non ho la cartella :/usr/src/linux/includeho invece una cartella:/usr/src/linux-headers-2.6.35-22/include/quindi compilo con:gcc -c -I/usr/src/linux/include -DMODULE -D__KERNEL__ -o miodriver.oil problema che lanciando questo comando l'output è:Codice: Seleziona tuttosoluzione.c:3:26: error: linux/module.h: No such file or directory
soluzione.c:4:25: error: asm/uaccess.h: No such file or directory
soluzione.c:5:24: error: linux/init.h: No such file or directory
soluzione.c:6:20: error: asm/io.h: No such file or directory
soluzione.c:7:21: error: strings.h: No such file or directory
soluzione.c:9: warning: data definition has no type or storage class
soluzione.c:15: warning: ‘struct file’ declared inside parameter list
soluzione.c:15: warning: its scope is only this definition or declaration, which is probably not what you want
soluzione.c:15: warning: ‘struct inode’ declared inside parameter list
soluzione.c: In function ‘my_open’:
soluzione.c:17: error: ‘MOD_INC_USE_COUNT’ undeclared (first use in this function)
soluzione.c:17: error: (Each undeclared identifier is reported only once
soluzione.c:17: error: for each function it appears in.)
soluzione.c: At top level:
soluzione.c:21: warning: ‘struct file’ declared inside parameter list
soluzione.c:21: warning: ‘struct inode’ declared inside parameter list
soluzione.c: In function ‘my_release’:
soluzione.c:23: error: ‘MOD_DEC_USE_COUNT’ undeclared (first use in this function)
soluzione.c: At