LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices



Reply
 
Search this Thread
Old 02-28-2013, 10:12 AM   #1
vsselvaraj
LQ Newbie
 
Registered: Feb 2013
Posts: 5

Rep: Reputation: Disabled
Unhappy Using filp_open , read , write .. Throws error....


gcc -I/usr/src/linux-headers-3.5.0-25/arch/x86/include -I/usr/src/linux-headers-3.5.0-25/include -I/usr/src/linux-headers-3.5.0-22-generic/include testfile.cpp


gcc -I /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/ -I/usr/src/linux-headers-3.2.0-23/include -I/usr/src/linux-headers-3.2.0-23-generic/include testfile.cpp
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/fs.h:12:0,
from testfile.cpp:2:
/usr/src/linux-headers-3.2.0-23/include/linux/types.h:13:2: warning: #warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" [-Wcpp]
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:455:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:52,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/asm-generic/bitops/fls64.h:33:2: error: #error BITS_PER_LONG not 32 or 64
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:52:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:164:2: error: #error BITS_PER_LONG not 32 or 64
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:26:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:148:37: error: "and" may not appear in macro parameter list
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/div64.h:57:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/math64.h:5,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:29,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/asm-generic/div64.h:54:3: error: #error do_div() does not yet support the C64
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:157:0: warning: "cache_line_size" redefined [enabled by default]
/usr/src/linux-headers-3.2.0-23/include/linux/cache.h:64:0: note: this is the location of the previous definition
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/irq.h:20:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/hardirq.h:5,
from /usr/src/linux-headers-3.2.0-23/include/linux/hardirq.h:7,
from /usr/src/linux-headers-3.2.0-23/include/linux/highmem.h:8,
from /usr/src/linux-headers-3.2.0-23/include/linux/pagemap.h:10,
from /usr/src/linux-headers-3.2.0-23/include/linux/buffer_head.h:13,
from testfile.cpp:5:
/usr/src/linux-headers-3.2.0-23/include/linux/gfp.h:214:2: error: #error ZONES_SHIFT too large to create GFP_ZONE_TABLE integer
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8:0,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:23:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:24:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:25:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:26:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:27:4: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:28:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:37:4: error: ‘u64’ does not name a type
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:16:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:52,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/alternative.h:46:2: error: ‘s32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/alternative.h:47:2: error: ‘s32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/alternative.h:48:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/alternative.h:49:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/alternative.h:50:2: error: ‘u8’ does not name a type
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:22:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:52,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘void set_bit(unsigned int, volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:64:6: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:65:13: error: ‘u8’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘void clear_bit(int, volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:102:6: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:13: error: ‘u8’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:16: error: expected ‘)’ before ‘~’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:16: error: expected ‘)’ before ‘~’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:32: error: expected ‘;’ before ‘)’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:32: error: expected primary-expression before ‘)’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:103:32: error: expected ‘;’ before ‘)’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘void clear_bit_unlock(unsigned int, volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:121:10: error: ‘barrier’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘void __clear_bit_unlock(unsigned int, volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:144:10: error: ‘barrier’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘void change_bit(int, volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:178:6: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:179:13: error: ‘u8’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h: In function ‘int constant_test_bit(unsigned int, const volatile long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/bitops.h:311:24: error: ‘BITS_PER_LONG’ was not declared in this scope
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:52:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h: In function ‘int get_bitmask_order(unsigned int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:33:19: error: ‘fls’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h: In function ‘int get_count_order(unsigned int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:41:19: error: ‘fls’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h: In function ‘long unsigned int hweight_long(long unsigned int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:49:37: error: ‘hweight32’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:49:52: error: ‘hweight64’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h: In function ‘unsigned int fls_long(long unsigned int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:146:15: error: ‘fls’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:147:16: error: ‘fls64’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h: At global scope:
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:158:37: error: ‘__ffs64’ declared as an ‘inline’ variable
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:158:37: error: ‘u64’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitops.h:159:1: error: expected ‘,’ or ‘;’ before ‘{’ token
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/current.h:5:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:15,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/percpu.h: In function ‘int x86_this_cpu_constant_test_bit(unsigned int, const long unsigned int*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/percpu.h:552:59: error: ‘BITS_PER_LONG’ was not declared in this scope
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/cmpxchg.h:154:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/system.h:7,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:17,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/cmpxchg_64.h: At global scope:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/cmpxchg_64.h:4:39: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/cmpxchg_64.h:4:44: error: ISO C++ forbids declaration of ‘ptr’ with no type [-fpermissive]
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/cmpxchg_64.h:4:49: error: ‘u64’ has not been declared
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/irqflags.h:15:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/system.h:11,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:17,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/irqflags.h:65:37: error: can’t set ‘no_instrument_function’ attribute after definition
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/irqflags.h:70:28: error: can’t set ‘no_instrument_function’ attribute after definition
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/irqflags.h:75:28: error: can’t set ‘no_instrument_function’ attribute after definition
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/irqflags.h:80:28: error: can’t set ‘no_instrument_function’ attribute after definition
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/irqflags.h:106:37: error: can’t set ‘no_instrument_function’ attribute after definition
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:5:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:19,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/page_types.h:49:15: error: ‘phys_addr_t’ does not name a type
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:19:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: In function ‘pgdval_t pgd_flags(pgd_t)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:208:31: error: ‘phys_addr_t’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: In function ‘pudval_t pud_flags(pud_t)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:255:31: error: ‘phys_addr_t’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: In function ‘pmdval_t pmd_flags(pmd_t)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:260:31: error: ‘phys_addr_t’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: In function ‘pte_t native_make_pte(pteval_t)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:265:15: error: expected primary-expression before ‘)’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:265:17: error: expected ‘;’ before ‘{’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:265:19: error: expected primary-expression before ‘.’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:265:30: error: expected ‘;’ before ‘}’ token
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: In function ‘pteval_t pte_flags(pte_t)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:275:31: error: ‘phys_addr_t’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h: At global scope:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:304:38: error: variable or field ‘native_pagetable_reserve’ declared void
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:304:38: error: ‘u64’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/pgtable_types.h:304:49: error: ‘u64’ was not declared in this scope
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:22:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:29:4: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:30:4: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:52:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:53:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:55:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:56:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:57:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:72:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:73:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:76:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/desc_defs.h:77:2: error: ‘u32’ does not name a type
In file included from /usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:11:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:26,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:136:50: error: expected ‘,’ or ‘...’ before ‘new’
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:138:50: error: expected ‘,’ or ‘...’ before ‘new’
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_zero(long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:161:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:164:32: error: ‘BITS_TO_LONGS’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_fill(long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:171:37: error: ‘BITS_TO_LONGS’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:172:7: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:176:20: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_copy(long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:182:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:185:32: error: ‘BITS_TO_LONGS’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_and(long unsigned int*, const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:193:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_or(long unsigned int*, const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:201:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_xor(long unsigned int*, const long unsigned int*, const long unsigned int*, int)’:



and my code is

#include <linux/fs.h>
#include <asm/segment.h>
#include <asm/uaccess.h>
#include <linux/buffer_head.h>

struct file* file_open(const char* path, int flags, int rights=0) {
struct file* filp = NULL;
mm_segment_t oldfs;
int err = 0;

oldfs = get_fs();
set_fs(get_ds());
filp = filp_open(path, flags, rights);
set_fs(oldfs);
if(IS_ERR(filp)) {
err = PTR_ERR(filp);
return NULL;
}
return filp;
}

void file_close(struct file* file) {
filp_close(file, NULL);
}

int file_read(struct file* file, unsigned long long offset, unsigned char* data) {
mm_segment_t oldfs;
int ret;

oldfs = get_fs();
set_fs(get_ds());

ret = vfs_read(file, data, 1000000, &offset);

set_fs(oldfs);
return ret;
}

void main()
{
struct file* filep = file_open("/home/",O_RDWR,0);
int i =0;
unsigned char* data;
while(data.length() < 1000000)
{
int res = file_read(&filep,(i*1000000)+1,&data);
i++;
}
file_close(&filep);
return;
}


Can someone help me to solve this issue...


Thanks

Selva
 
Old 02-28-2013, 10:13 AM   #2
vsselvaraj
LQ Newbie
 
Registered: Feb 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Remaining errors

/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:210:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_andnot(long unsigned int*, const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:219:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_complement(long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:227:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_equal(const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:236:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_intersects(const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:245:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_subset(const long unsigned int*, const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:254:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_empty(const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:262:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_full(const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:270:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘int bitmap_weight(const long unsigned int*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:278:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_shift_right(long unsigned int*, const long unsigned int*, int, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:286:6: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h: In function ‘void bitmap_shift_left(long unsigned int*, const long unsigned int*, int, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/bitmap.h:295:6: error: ‘BITS_PER_LONG’ was not declared in this scope
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:26:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: At global scope:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:13:41: error: ‘bits’ has not been declared
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:13:47: error: expected identifier before numeric constant
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:13:47: error: expected ‘,’ or ‘...’ before numeric constant
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:13:54: error: ISO C++ forbids declaration of ‘DECLARE_BITMAP’ with no type [-fpermissive]
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_set_cpu(unsigned int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:256:30: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_clear_cpu(int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:266:32: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_test_and_set_cpu(int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:288:46: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_test_and_clear_cpu(int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:300:48: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_setall(cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:309:14: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_clear(cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:318:14: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_and(cpumask*, const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:331:20: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:331:40: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:332:12: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_or(cpumask*, const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:344:12: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:344:32: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:345:11: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_xor(cpumask*, const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:358:13: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:358:33: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:359:12: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_andnot(cpumask*, const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:372:23: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:372:43: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:373:8: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_complement(cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:384:20: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:384:40: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘bool cpumask_equal(const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:396:22: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:396:43: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘bool cpumask_intersects(const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:408:27: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:408:48: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_subset(const cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:420:23: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:420:44: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘bool cpumask_empty(const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:430:22: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘bool cpumask_full(const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:439:21: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘unsigned int cpumask_weight(const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:448:23: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_shift_right(cpumask*, const cpumask*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:460:21: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:460:41: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_shift_left(cpumask*, const cpumask*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:473:20: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:473:40: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void cpumask_copy(cpumask*, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:485:14: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:485:34: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_scnprintf(char*, int, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:532:36: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_parse_user(const char*, int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:546:37: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpumask_parselist_user(const char*, int, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:560:41: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpulist_scnprintf(char*, int, const cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:576:40: error: ‘const struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int cpulist_parse(const char*, cpumask*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:590:31: error: ‘struct cpumask’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘size_t cpumask_size()’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:602:30: error: ‘BITS_TO_LONGS’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: At global scope:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:649:59: error: ‘gfp_t’ has not been declared
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:654:64: error: ‘gfp_t’ has not been declared
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:660:60: error: ‘gfp_t’ has not been declared
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:666:65: error: ‘gfp_t’ has not been declared
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:688:29: error: ISO C++ forbids declaration of ‘DECLARE_BITMAP’ with no type [-fpermissive]
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:688:29: error: ‘cpu_all_bits’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:688:50: error: expression list treated as compound expression in initializer [-fpermissive]
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:734:17: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:734:55: error: ‘BITS_TO_LONGS’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:734:56: error: array bound is not an integer constant before ‘]’ token
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘const cpumask* get_cpu_mask(unsigned int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:738:27: error: ‘cpu_bit_bitmap’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:738:52: error: ‘BITS_PER_LONG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpu_set(int, volatile cpumask_t*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:842:21: error: ‘volatile cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpu_clear(int, volatile cpumask_t*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:848:23: error: ‘volatile cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpus_setall(cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:854:20: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpus_clear(cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:860:20: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpu_test_and_set(int, cpumask_t*)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:869:37: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_and(cpumask_t*, const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:876:26: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:876:39: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:876:52: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpus_or(cpumask_t*, const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:883:18: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:883:31: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:883:44: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpus_xor(cpumask_t*, const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:890:19: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:890:32: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:890:45: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_andnot(cpumask_t*, const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:898:29: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:898:42: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:898:55: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_equal(const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:905:29: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:905:42: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_intersects(const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:912:34: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:912:47: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_subset(const cpumask_t*, const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:919:30: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:919:43: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_empty(const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:925:28: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘int __cpus_weight(const cpumask_t*, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:931:29: error: ‘const cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h: In function ‘void __cpus_shift_left(cpumask_t*, const cpumask_t*, int, int)’:
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:939:26: error: ‘cpumask_t’ has no member named ‘bits’
/usr/src/linux-headers-3.2.0-23/include/linux/cpumask.h:939:38: error: ‘const cpumask_t’ has no member named ‘bits’
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:29:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/math64.h: At global scope:
/usr/src/linux-headers-3.2.0-23/include/linux/math64.h:82:15: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/math64.h:93:15: error: ‘s64’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/math64.h:100:1: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23/include/linux/math64.h:102:24: error: ‘u32’ does not name a type
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:31:0,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:22:35: error: expected initializer before ‘ERR_PTR’
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:27:33: error: expected initializer before ‘PTR_ERR’
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:32:33: error: expected initializer before ‘IS_ERR’
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:37:33: error: expected initializer before ‘IS_ERR_OR_NULL’
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:49:35: error: expected initializer before ‘ERR_CAST’
/usr/src/linux-headers-3.2.0-23/include/linux/err.h:55:32: error: expected initializer before ‘PTR_RET’
In file included from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/thread_info.h:22:0,
from /usr/src/linux-headers-3.2.0-23/include/linux/thread_info.h:53,
from /usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/uaccess.h:8,
from testfile.cpp:4:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:98:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:99:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:100:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:101:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:114:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:115:30: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:115:47: error: requested alignment is not a constant
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h: In function ‘void load_cr3(pgd_t*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:189:22: error: ‘__pa’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:189:23: error: ‘write_cr3’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h: At global scope:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:227:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:228:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:229:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:230:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:231:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:232:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:233:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:234:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:235:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:236:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:238:27: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:238:27: error: requested alignment is not a constant
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:269:3: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:269:3: error: requested alignment is not a constant
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:283:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:284:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:285:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:286:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:287:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:288:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:289:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:292:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:295:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:299:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:300:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:301:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:302:2: error: ‘u16’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:305:4: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:306:4: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:309:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:310:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:311:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:312:4: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:315:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:316:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:319:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:322:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:324:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:327:3: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:328:3: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:334:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:335:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:336:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:337:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:338:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:339:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:340:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:342:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:343:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:344:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:345:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:346:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:347:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:348:2: error: ‘u8’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:350:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:355:2: error: ‘u32’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:359:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:360:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:361:2: error: ‘u64’ does not name a type
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h: In function ‘long unsigned int native_get_debugreg(int)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:502:7: error: ‘BUG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h: In function ‘void native_set_debugreg(int, long unsigned int)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:529:7: error: ‘BUG’ was not declared in this scope
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h: In function ‘void native_load_sp0(tss_struct*, thread_struct*)’:
/usr/src/linux-headers-3.2.0-23-generic/arch/x86/include/asm/processor.h:555:15: error: ‘struct x86_hw_tss’ has no member named ‘sp0’

void
 
Old 03-01-2013, 12:42 AM   #3
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
What exactly are you trying to do ?
If you are compiling c++ code user the g++ compiler not gcc.
Why are you including the kernel headers for compilation ?
 
Old 03-01-2013, 12:50 AM   #4
vsselvaraj
LQ Newbie
 
Registered: Feb 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for your response..

bsat,

I need to do file operations using filp_open.. I hope they are the kernal space functions.. and so they obviously need kernel headers..

I guess using filp_open and vfs_read and other file manipulation kernel functions will improve the performance of my code..

Thanks
-Selva
 
Old 03-01-2013, 12:59 AM   #5
vsselvaraj
LQ Newbie
 
Registered: Feb 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
To be more detailed of my task

I am reading the files from the client of my product that i develop and transferring to the server.. I need to increase the speed of my read and write operations.. also the usage of RAM memory effectively.. So instead of using fopen and read() and write() , i thought of changing to filp_open functions, which might increase the performance.

Can u also suggest how to use kernel level for reading the files and sending it to the server.. and writing the data at the server end..

Your help will surely make a considerable boooom to my code..

Thanks

Selva

Last edited by vsselvaraj; 03-01-2013 at 01:01 AM.
 
Old 03-02-2013, 02:48 AM   #6
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
As far as I know client server programs are user space programs, you can not do that from the kernel. and what you are writing is a user space code which needs to be compile using g++.
For kernel space code you will need to write modules, and compile them using makefiles.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - Newbie 16 09-01-2010 10:07 AM
Read Write access to a iso9660 filesystem..mount a .iso image as read write ceazar123 Linux - General 2 08-26-2010 04:32 PM
Reiserfs vs JFS base on Read, Re-read, Write, Re-write Hesi Linux - Desktop 1 03-19-2010 10:45 PM
Reiserfs vs JFS base on Read, Re-read, Write, Re-write Hesi Linux - Newbie 1 03-19-2010 05:08 AM


All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration