LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1055|回复: 2

模块编译问题,关于如何编译helloworld.ko

[复制链接]
发表于 2006-7-24 01:44:40 | 显示全部楼层 |阅读模式
源代码:ftp://ftp.ora.com/pub/examples/linux/drivers/
内核代码:linux-2.6.17
编译过程
建立一个hello.c的Makefile
$echo 'obj-m := hello.o '>Makefile
然后make
$make -C /usr/src/linux-2.6.17/ M=`pwd` hello
出现错误:
$ make -C /usr/src/linux-2.6.17/ M=`pwd` hello
make: Entering directory `/usr/src/linux-2.6.17'
gcc -m32 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -fomit-frame-pointer -pipe -msoft-float -mpreferred-stack-boundary=2  -march=i486  -ffreestanding -Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -m elf_i386  /home/huyongzs/computerstudy/ftp/misc-modules/hello.c   -o hello
cc1: error: missing argument to "-m"
make: *** [hello] 错误 1
make: Leaving directory `/usr/src/linux-2.6.17'
 楼主| 发表于 2006-7-24 02:23:21 | 显示全部楼层
òÏ把编Ñ命ä改成make -C /usr/src/linux-2.6.17/ M=`pwd` modules
但是ú来一部分错误
include/linux/aio_abi.h:85: error: syntax error before 'aio_reserved3'
include/linux/aio_abi.h:85: warning: type defaults to 'int' in declaration of 'aio_reserved3'
include/linux/aio_abi.h:85: warning: data definition has no type or storage class
In file included from include/linux/sched.h:245,
                 from include/linux/module.h:10,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/aio.h:94: error: syntax error before 'ssize_t'
include/linux/aio.h:94: warning: no semicolon at end of struct or union
include/linux/aio.h:102: error: syntax error before 'ki_user_data'
include/linux/aio.h:102: warning: type defaults to 'int' in declaration of 'ki_user_data'
include/linux/aio.h:102: warning: data definition has no type or storage class
include/linux/aio.h:104: error: syntax error before 'ki_pos'
include/linux/aio.h:104: warning: type defaults to 'int' in declaration of 'ki_pos'
include/linux/aio.h:104: warning: data definition has no type or storage class
include/linux/aio.h:109: error: syntax error before 'ki_nbytes'
include/linux/aio.h:109: warning: type defaults to 'int' in declaration of 'ki_nbytes'
include/linux/aio.h:109: warning: data definition has no type or storage class
include/linux/aio.h:111: error: syntax error before 'ki_left'
include/linux/aio.h:111: warning: type defaults to 'int' in declaration of 'ki_left'
include/linux/aio.h:111: warning: data definition has no type or storage class
include/linux/aio.h:118: error: syntax error before '}' token
include/linux/aio.h:152: error: array type has incomplete element type
include/linux/aio.h:172: error: syntax error before 'atomic_t'
include/linux/aio.h:172: warning: no semicolon at end of struct or union
include/linux/aio.h:194: error: syntax error before '}' token
include/linux/aio.h:199: error: syntax error before 'wait_on_sync_kiocb'
include/linux/aio.h:199: warning: type defaults to 'int' in declaration of 'wait_on_sync_kiocb'
include/linux/aio.h:199: warning: data definition has no type or storage class
include/linux/aio.h: In function 'list_kiocb':
include/linux/aio.h:243: error: dereferencing pointer to incomplete type
include/linux/aio.h:243: warning: type defaults to 'int' in declaration of '__mptr'
include/linux/aio.h:243: warning: initialization from incompatible pointer type
include/linux/aio.h:243: error: invalid use of undefined type 'struct kiocb'
In file included from include/linux/module.h:10,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/sched.h: At top level:
include/linux/sched.h:307: error: syntax error before 'pgd_t'
include/linux/sched.h:307: warning: no semicolon at end of struct or union
include/linux/sched.h:308: warning: type defaults to 'int' in declaration of 'mm_users'
include/linux/sched.h:308: warning: data definition has no type or storage class
include/linux/sched.h:309: error: syntax error before 'mm_count'
include/linux/sched.h:309: warning: type defaults to 'int' in declaration of 'mm_count'
include/linux/sched.h:309: warning: data definition has no type or storage class
include/linux/sched.h:336: error: syntax error before ':' token
include/linux/sched.h:340: error: syntax error before 'context'
include/linux/sched.h:340: warning: type defaults to 'int' in declaration of 'context'
include/linux/sched.h:340: warning: data definition has no type or storage class
include/linux/sched.h:353: error: syntax error before '}' token
include/linux/sched.h:356: error: syntax error before 'atomic_t'
include/linux/sched.h:356: warning: no semicolon at end of struct or union
include/linux/sched.h:357: error: '_NSIG' undeclared here (not in a function)
include/linux/sched.h:359: error: syntax error before '}' token
include/linux/sched.h:369: error: syntax error before 'atomic_t'
include/linux/sched.h:369: warning: no semicolon at end of struct or union
include/linux/sched.h:370: warning: type defaults to 'int' in declaration of 'live'
include/linux/sched.h:370: warning: data definition has no type or storage class
include/linux/sched.h:400: error: syntax error before 'it_real_incr'
include/linux/sched.h:400: warning: type defaults to 'int' in declaration of 'it_real_incr'
include/linux/sched.h:400: warning: data definition has no type or storage class
include/linux/sched.h:403: error: syntax error before 'it_prof_expires'
include/linux/sched.h:403: warning: type defaults to 'int' in declaration of 'it_prof_expires'
include/linux/sched.h:403: warning: type defaults to 'int' in declaration of 'it_virt_expires'
include/linux/sched.h:403: warning: data definition has no type or storage class
include/linux/sched.h:404: error: syntax error before 'it_prof_incr'
include/linux/sched.h:404: warning: type defaults to 'int' in declaration of 'it_prof_incr'
include/linux/sched.h:404: warning: type defaults to 'int' in declaration of 'it_virt_incr'
include/linux/sched.h:404: warning: data definition has no type or storage class
include/linux/sched.h:407: error: syntax error before 'pgrp'
include/linux/sched.h:407: warning: type defaults to 'int' in declaration of 'pgrp'
include/linux/sched.h:407: warning: data definition has no type or storage class
include/linux/sched.h:408: error: syntax error before 'tty_old_pgrp'
include/linux/sched.h:408: warning: type defaults to 'int' in declaration of 'tty_old_pgrp'
include/linux/sched.h:408: warning: data definition has no type or storage class
include/linux/sched.h:409: error: syntax error before 'session'
include/linux/sched.h:409: warning: type defaults to 'int' in declaration of 'session'
include/linux/sched.h:409: warning: data definition has no type or storage class
include/linux/sched.h:421: error: syntax error before 'utime'
include/linux/sched.h:421: warning: type defaults to 'int' in declaration of 'utime'
include/linux/sched.h:421: warning: type defaults to 'int' in declaration of 'stime'
include/linux/sched.h:421: warning: type defaults to 'int' in declaration of 'cutime'
include/linux/sched.h:421: warning: type defaults to 'int' in declaration of 'cstime'
include/linux/sched.h:421: warning: data definition has no type or storage class
include/linux/sched.h:442: error: 'RLIM_NLIMITS' undeclared here (not in a function)
include/linux/sched.h:452: error: syntax error before '}' token
include/linux/sched.h:493: error: syntax error before 'atomic_t'
include/linux/sched.h:493: warning: no semicolon at end of struct or union
include/linux/sched.h:494: warning: type defaults to 'int' in declaration of 'processes'
include/linux/sched.h:494: warning: data definition has no type or storage class
include/linux/sched.h:495: error: syntax error before 'files'
include/linux/sched.h:495: warning: type defaults to 'int' in declaration of 'files'
include/linux/sched.h:495: warning: data definition has no type or storage class
include/linux/sched.h:496: error: syntax error before 'sigpending'
include/linux/sched.h:496: warning: type defaults to 'int' in declaration of 'sigpending'
include/linux/sched.h:496: warning: data definition has no type or storage class
include/linux/sched.h:498: error: syntax error before 'inotify_watches'
include/linux/sched.h:498: warning: type defaults to 'int' in declaration of 'inotify_watches'
include/linux/sched.h:498: warning: data definition has no type or storage class
include/linux/sched.h:499: error: syntax error before 'inotify_devs'
include/linux/sched.h:499: warning: type defaults to 'int' in declaration of 'inotify_devs'
include/linux/sched.h:499: warning: data definition has no type or storage class
include/linux/sched.h:512: error: syntax error before 'uid'
include/linux/sched.h:512: warning: type defaults to 'int' in declaration of 'uid'
include/linux/sched.h:512: warning: data definition has no type or storage class
include/linux/sched.h:515: warning: parameter names (without types) in function declaration
include/linux/sched.h:650: error: syntax error before 'atomic_t'
include/linux/sched.h:650: warning: no semicolon at end of struct or union
include/linux/sched.h:651: warning: type defaults to 'int' in declaration of 'small_block'
include/linux/sched.h:651: warning: data definition has no type or storage class
include/linux/sched.h:653: error: syntax error before '*' token
include/linux/sched.h:653: warning: type defaults to 'int' in declaration of 'blocks'
include/linux/sched.h:653: warning: data definition has no type or storage class
include/linux/sched.h:654: error: syntax error before '}' token
include/linux/sched.h:674: error: syntax error before 'gid_t'
include/linux/sched.h:674: warning: function declaration isn't a prototype
include/linux/sched.h:699: error: syntax error before 'atomic_t'
include/linux/sched.h:699: warning: no semicolon at end of struct or union
include/linux/sched.h:700: error: conflicting types for 'flags'
include/linux/sched.h:392: error: previous declaration of 'flags' was here
include/linux/sched.h:728: error: conflicting types for 'tasks'
include/linux/pid.h:49: error: previous declaration of 'tasks' was here
include/linux/sched.h:745: error: syntax error before ':' token
include/linux/sched.h:746: warning: type defaults to 'int' in declaration of 'pid'
include/linux/sched.h:746: warning: data definition has no type or storage class
include/linux/sched.h:747: error: syntax error before 'tgid'
include/linux/sched.h:747: warning: type defaults to 'int' in declaration of 'tgid'
include/linux/sched.h:747: warning: data definition has no type or storage class
include/linux/sched.h:772: error: syntax error before 'utime'
include/linux/sched.h:772: warning: type defaults to 'int' in declaration of 'utime'
include/linux/sched.h:772: warning: type defaults to 'int' in declaration of 'stime'
include/linux/sched.h:772: warning: data definition has no type or storage class
include/linux/sched.h:778: error: syntax error before 'it_prof_expires'
include/linux/sched.h:778: warning: type defaults to 'int' in declaration of 'it_prof_expires'
include/linux/sched.h:778: warning: type defaults to 'int' in declaration of 'it_virt_expires'
include/linux/sched.h:778: warning: data definition has no type or storage class
include/linux/sched.h:783: error: syntax error before 'uid'
include/linux/sched.h:783: warning: type defaults to 'int' in declaration of 'uid'
include/linux/sched.h:783: warning: type defaults to 'int' in declaration of 'euid'
include/linux/sched.h:783: warning: type defaults to 'int' in declaration of 'suid'
include/linux/sched.h:783: warning: type defaults to 'int' in declaration of 'fsuid'
include/linux/sched.h:783: warning: data definition has no type or storage class
include/linux/sched.h:784: error: syntax error before 'gid'
include/linux/sched.h:784: warning: type defaults to 'int' in declaration of 'gid'
include/linux/sched.h:784: warning: type defaults to 'int' in declaration of 'egid'
include/linux/sched.h:784: warning: type defaults to 'int' in declaration of 'sgid'
include/linux/sched.h:784: warning: type defaults to 'int' in declaration of 'fsgid'
include/linux/sched.h:784: warning: data definition has no type or storage class
include/linux/sched.h:786: error: syntax error before 'cap_effective'
include/linux/sched.h:786: warning: type defaults to 'int' in declaration of 'cap_effective'
include/linux/sched.h:786: warning: type defaults to 'int' in declaration of 'cap_inheritable'
include/linux/sched.h:786: warning: type defaults to 'int' in declaration of 'cap_permitted'
include/linux/sched.h:786: warning: data definition has no type or storage class
include/linux/sched.h:787: error: syntax error before ':' token
include/linux/sched.h:808: error: conflicting types for 'files'
include/linux/sched.h:495: error: previous declaration of 'files' was here
include/linux/sched.h:815: error: syntax error before 'blocked'
include/linux/sched.h:815: warning: type defaults to 'int' in declaration of 'blocked'
include/linux/sched.h:815: warning: type defaults to 'int' in declaration of 'real_blocked'
include/linux/sched.h:815: warning: data definition has no type or storage class
include/linux/sched.h:816: error: syntax error before 'saved_sigmask'
include/linux/sched.h:816: warning: type defaults to 'int' in declaration of 'saved_sigmask'
include/linux/sched.h:816: warning: data definition has no type or storage class
include/linux/sched.h:820: error: syntax error before 'sas_ss_size'
include/linux/sched.h:820: warning: type defaults to 'int' in declaration of 'sas_ss_size'
include/linux/sched.h:820: warning: data definition has no type or storage class
include/linux/sched.h:823: error: syntax error before '*' token
include/linux/sched.h:823: warning: type defaults to 'int' in declaration of 'notifier_mask'
include/linux/sched.h:823: warning: data definition has no type or storage class
include/linux/sched.h:830: error: syntax error before 'parent_exec_id'
include/linux/sched.h:830: warning: type defaults to 'int' in declaration of 'parent_exec_id'
include/linux/sched.h:830: warning: data definition has no type or storage class
include/linux/sched.h:831: error: syntax error before 'self_exec_id'
include/linux/sched.h:831: warning: type defaults to 'int' in declaration of 'self_exec_id'
include/linux/sched.h:831: warning: data definition has no type or storage class
include/linux/sched.h:854: error: syntax error before '*' token
include/linux/sched.h:854: warning: type defaults to 'int' in declaration of 'last_siginfo'
include/linux/sched.h:854: warning: data definition has no type or storage class
include/linux/sched.h:863: error: syntax error before 'rchar'
include/linux/sched.h:863: warning: type defaults to 'int' in declaration of 'rchar'
include/linux/sched.h:863: warning: type defaults to 'int' in declaration of 'wchar'
include/linux/sched.h:863: warning: type defaults to 'int' in declaration of 'syscr'
include/linux/sched.h:863: warning: type defaults to 'int' in declaration of 'syscw'
include/linux/sched.h:863: warning: data definition has no type or storage class
include/linux/sched.h:865: error: syntax error before 'acct_rss_mem1'
include/linux/sched.h:865: warning: type defaults to 'int' in declaration of 'acct_rss_mem1'
include/linux/sched.h:865: warning: data definition has no type or storage class
include/linux/sched.h:866: error: syntax error before 'acct_vm_mem1'
include/linux/sched.h:866: warning: type defaults to 'int' in declaration of 'acct_vm_mem1'
include/linux/sched.h:866: warning: data definition has no type or storage class
include/linux/sched.h:867: error: syntax error before 'acct_stimexpd'
include/linux/sched.h:867: warning: type defaults to 'int' in declaration of 'acct_stimexpd'
include/linux/sched.h:867: warning: data definition has no type or storage class
include/linux/sched.h:884: error: syntax error before 'fs_excl'
include/linux/sched.h:884: warning: type defaults to 'int' in declaration of 'fs_excl'
include/linux/sched.h:884: warning: data definition has no type or storage class
include/linux/sched.h:891: error: syntax error before '}' token
include/linux/sched.h:893: error: syntax error before 'process_group'
include/linux/sched.h:894: warning: return type defaults to 'int'
include/linux/sched.h: In function 'process_group':
include/linux/sched.h:895: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'pid_alive':
include/linux/sched.h:908: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'put_task_struct':
include/linux/sched.h:918: warning: implicit declaration of function 'atomic_dec_and_test'
include/linux/sched.h:918: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'set_cpus_allowed':
include/linux/sched.h:983: error: 'EINVAL' undeclared (first use in this function)
include/linux/sched.h: At top level:
include/linux/sched.h:1024: error: field 'thread_info' has incomplete type
include/linux/sched.h:1025: error: 'THREAD_SIZE' undeclared here (not in a function)
include/linux/sched.h:1045: error: syntax error before 'session'
include/linux/sched.h:1045: warning: function declaration isn't a prototype
include/linux/sched.h:1046: error: syntax error before 'session'
include/linux/sched.h:1046: warning: function declaration isn't a prototype
include/linux/sched.h:1049: warning: parameter names (without types) in function declaration
include/linux/sched.h: In function 'get_uid':
include/linux/sched.h:1052: error: dereferencing pointer to incomplete type
include/linux/sched.h: At top level:
include/linux/sched.h:1074: warning: parameter names (without types) in function declaration
include/linux/sched.h:1075: warning: parameter names (without types) in function declaration
include/linux/sched.h:1080: error: syntax error before 'sigset_t'
include/linux/sched.h:1080: warning: function declaration isn't a prototype
include/linux/sched.h:1082: error: syntax error before 'sigset_t'
include/linux/sched.h:1083: warning: function declaration isn't a prototype
include/linux/sched.h: In function 'dequeue_signal_lock':
include/linux/sched.h:1087: warning: implicit declaration of function 'local_irq_save'
include/linux/sched.h:1087: error: dereferencing pointer to incomplete type
include/linux/sched.h:1088: error: 'mask' undeclared (first use in this function)
include/linux/sched.h:1088: error: 'info' undeclared (first use in this function)
include/linux/sched.h:1089: warning: implicit declaration of function 'local_irq_restore'
include/linux/sched.h:1089: error: dereferencing pointer to incomplete type
include/linux/sched.h: At top level:
include/linux/sched.h:1095: error: syntax error before 'sigset_t'
include/linux/sched.h:1095: warning: function declaration isn't a prototype
include/linux/sched.h:1098: warning: 'struct siginfo' declared inside parameter list
include/linux/sched.h:1099: warning: 'struct siginfo' declared inside parameter list
include/linux/sched.h:1101: warning: 'struct siginfo' declared inside parameter list
include/linux/sched.h:1102: error: syntax error before 'pid_t'
include/linux/sched.h:1102: warning: function declaration isn't a prototype
include/linux/sched.h:1103: error: syntax error before 'pid_t'
include/linux/sched.h:1103: warning: function declaration isn't a prototype
include/linux/sched.h:1104: error: syntax error before 'pid_t'
include/linux/sched.h:1104: warning: function declaration isn't a prototype
include/linux/sched.h:1105: error: syntax error before 'pid_t'
include/linux/sched.h:1105: warning: function declaration isn't a prototype
include/linux/sched.h:1111: error: syntax error before 'int'
include/linux/sched.h:1111: warning: function declaration isn't a prototype
include/linux/sched.h:1112: error: syntax error before 'int'
include/linux/sched.h:1112: warning: function declaration isn't a prototype
include/linux/sched.h:1118: warning: type defaults to 'int' in declaration of 'stack_t'
include/linux/sched.h:1118: error: syntax error before '*' token
include/linux/sched.h:1118: warning: function declaration isn't a prototype
include/linux/sched.h:1125: warning: 'struct siginfo' declared inside parameter list
include/linux/sched.h: In function 'on_sig_stack':
include/linux/sched.h:1134: error: 'current' undeclared (first use in this function)
include/linux/sched.h: In function 'sas_ss_flags':
include/linux/sched.h:1139: error: 'current' undeclared (first use in this function)
include/linux/sched.h:1140: error: 'SS_DISABLE' undeclared (first use in this function)
include/linux/sched.h:1140: error: 'SS_ONSTACK' undeclared (first use in this function)
include/linux/sched.h: In function 'mmdrop':
include/linux/sched.h:1152: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'next_thread':
include/linux/sched.h:1215: error: dereferencing pointer to incomplete type
include/linux/sched.h:1215: warning: type defaults to 'int' in declaration of '__mptr'
include/linux/sched.h:1215: error: dereferencing pointer to incomplete type
include/linux/sched.h:1215: warning: type defaults to 'int' in declaration of '_________p1'
include/linux/sched.h:1215: error: dereferencing pointer to incomplete type
include/linux/sched.h:1215: warning: implicit declaration of function 'smp_read_barrier_depends'
include/linux/sched.h:1215: warning: initialization makes pointer from integer without a cast
include/linux/sched.h:1215: error: invalid use of incomplete typedef 'task_t'
include/linux/sched.h: In function 'thread_group_empty':
include/linux/sched.h:1221: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'task_lock':
include/linux/sched.h:1238: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'task_unlock':
include/linux/sched.h:1243: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'unlock_task_sighand':
include/linux/sched.h:1252: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'setup_thread_stack':
include/linux/sched.h:1262: error: dereferencing pointer to incomplete type
include/linux/sched.h:1262: error: dereferencing pointer to incomplete type
include/linux/sched.h:1263: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'end_of_stack':
include/linux/sched.h:1268: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'set_tsk_thread_flag':
include/linux/sched.h:1278: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'clear_tsk_thread_flag':
include/linux/sched.h:1283: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'test_and_set_tsk_thread_flag':
include/linux/sched.h:1288: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'test_and_clear_tsk_thread_flag':
include/linux/sched.h:1293: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'test_tsk_thread_flag':
include/linux/sched.h:1298: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'set_tsk_need_resched':
include/linux/sched.h:1303: error: 'TIF_NEED_RESCHED' undeclared (first use in this function)
include/linux/sched.h: In function 'clear_tsk_need_resched':
include/linux/sched.h:1308: error: 'TIF_NEED_RESCHED' undeclared (first use in this function)
include/linux/sched.h: In function 'signal_pending':
include/linux/sched.h:1313: error: 'TIF_SIGPENDING' undeclared (first use in this function)
include/linux/sched.h: In function 'need_resched':
include/linux/sched.h:1318: error: 'TIF_NEED_RESCHED' undeclared (first use in this function)
include/linux/sched.h:1318: warning: passing argument 1 of 'test_ti_thread_flag' makes pointer from integer without a cast
include/linux/sched.h: In function 'arch_pick_mmap_layout':
include/linux/sched.h:1395: error: dereferencing pointer to incomplete type
include/linux/sched.h:1395: error: 'TASK_UNMAPPED_BASE' undeclared (first use in this function)
include/linux/sched.h:1396: error: dereferencing pointer to incomplete type
include/linux/sched.h:1397: error: dereferencing pointer to incomplete type
include/linux/sched.h: At top level:
include/linux/sched.h:1401: error: syntax error before 'pid'
include/linux/sched.h:1401: warning: function declaration isn't a prototype
include/linux/sched.h:1402: error: syntax error before 'pid'
include/linux/sched.h:1402: warning: function declaration isn't a prototype
include/linux/sched.h: In function 'frozen':
include/linux/sched.h:1412: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'freezing':
include/linux/sched.h:1420: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'freeze':
include/linux/sched.h:1429: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'thaw_process':
include/linux/sched.h:1438: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'frozen_process':
include/linux/sched.h:1450: error: dereferencing pointer to incomplete type
include/linux/sched.h:1450: error: dereferencing pointer to incomplete type
include/linux/sched.h: In function 'try_to_freeze':
include/linux/sched.h:1459: error: 'current' undeclared (first use in this function)
In file included from include/linux/module.h:13,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/stat.h:6:22: error: asm/stat.h: 没有那个文件或目录
In file included from include/linux/module.h:13,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/stat.h: At top level:
include/linux/stat.h:61: error: syntax error before 'dev_t'
include/linux/stat.h:61: warning: no semicolon at end of struct or union
include/linux/stat.h:62: warning: type defaults to 'int' in declaration of 'mode'
include/linux/stat.h:62: warning: data definition has no type or storage class
include/linux/stat.h:64: error: syntax error before 'uid'
include/linux/stat.h:64: warning: type defaults to 'int' in declaration of 'uid'
include/linux/stat.h:64: warning: data definition has no type or storage class
include/linux/stat.h:65: error: syntax error before 'gid'
include/linux/stat.h:65: warning: type defaults to 'int' in declaration of 'gid'
include/linux/stat.h:65: warning: data definition has no type or storage class
include/linux/stat.h:66: error: syntax error before 'rdev'
include/linux/stat.h:66: warning: type defaults to 'int' in declaration of 'rdev'
include/linux/stat.h:66: warning: data definition has no type or storage class
include/linux/stat.h:67: error: syntax error before 'size'
include/linux/stat.h:67: warning: type defaults to 'int' in declaration of 'size'
include/linux/stat.h:67: warning: data definition has no type or storage class
include/linux/stat.h:72: error: conflicting types for 'blocks'
include/linux/sched.h:653: error: previous declaration of 'blocks' was here
include/linux/stat.h:73: error: syntax error before '}' token
In file included from include/linux/module.h:17,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/elf.h:6:21: error: asm/elf.h: 没有那个文件或目录
In file included from include/linux/module.h:17,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/elf.h:16: error: syntax error before 'Elf32_Addr'
include/linux/elf.h:16: warning: type defaults to 'int' in declaration of 'Elf32_Addr'
include/linux/elf.h:16: warning: data definition has no type or storage class
include/linux/elf.h:17: error: syntax error before 'Elf32_Half'
include/linux/elf.h:17: warning: type defaults to 'int' in declaration of 'Elf32_Half'
include/linux/elf.h:17: warning: data definition has no type or storage class
include/linux/elf.h:18: error: syntax error before 'Elf32_Off'
include/linux/elf.h:18: warning: type defaults to 'int' in declaration of 'Elf32_Off'
include/linux/elf.h:18: warning: data definition has no type or storage class
include/linux/elf.h:19: error: syntax error before 'Elf32_Sword'
include/linux/elf.h:19: warning: type defaults to 'int' in declaration of 'Elf32_Sword'
include/linux/elf.h:19: warning: data definition has no type or storage class
include/linux/elf.h:20: error: syntax error before 'Elf32_Word'
include/linux/elf.h:20: warning: type defaults to 'int' in declaration of 'Elf32_Word'
include/linux/elf.h:20: warning: data definition has no type or storage class
include/linux/elf.h:23: error: syntax error before 'Elf64_Addr'
include/linux/elf.h:23: warning: type defaults to 'int' in declaration of 'Elf64_Addr'
include/linux/elf.h:23: warning: data definition has no type or storage class
include/linux/elf.h:24: error: syntax error before 'Elf64_Half'
include/linux/elf.h:24: warning: type defaults to 'int' in declaration of 'Elf64_Half'
include/linux/elf.h:24: warning: data definition has no type or storage class
include/linux/elf.h:25: error: syntax error before 'Elf64_SHalf'
include/linux/elf.h:25: warning: type defaults to 'int' in declaration of 'Elf64_SHalf'
include/linux/elf.h:25: warning: data definition has no type or storage class
include/linux/elf.h:26: error: syntax error before 'Elf64_Off'
include/linux/elf.h:26: warning: type defaults to 'int' in declaration of 'Elf64_Off'
include/linux/elf.h:26: warning: data definition has no type or storage class
include/linux/elf.h:27: error: syntax error before 'Elf64_Sword'
include/linux/elf.h:27: warning: type defaults to 'int' in declaration of 'Elf64_Sword'
include/linux/elf.h:27: warning: data definition has no type or storage class
include/linux/elf.h:28: error: syntax error before 'Elf64_Word'
include/linux/elf.h:28: warning: type defaults to 'int' in declaration of 'Elf64_Word'
include/linux/elf.h:28: warning: data definition has no type or storage class
include/linux/elf.h:29: error: syntax error before 'Elf64_Xword'
include/linux/elf.h:29: warning: type defaults to 'int' in declaration of 'Elf64_Xword'
include/linux/elf.h:29: warning: data definition has no type or storage class
include/linux/elf.h:30: error: syntax error before 'Elf64_Sxword'
include/linux/elf.h:30: warning: type defaults to 'int' in declaration of 'Elf64_Sxword'
include/linux/elf.h:30: warning: data definition has no type or storage class
include/linux/elf.h:165: error: syntax error before 'Elf32_Sword'
include/linux/elf.h:165: warning: no semicolon at end of struct or union
include/linux/elf.h:167: error: syntax error before 'Elf32_Sword'
include/linux/elf.h:167: warning: no semicolon at end of struct or union
include/linux/elf.h:168: warning: type defaults to 'int' in declaration of 'd_ptr'
include/linux/elf.h:168: warning: data definition has no type or storage class
include/linux/elf.h:169: warning: type defaults to 'int' in declaration of 'd_un'
include/linux/elf.h:169: warning: data definition has no type or storage class
include/linux/elf.h:170: error: syntax error before '}' token
include/linux/elf.h:170: warning: type defaults to 'int' in declaration of 'Elf32_Dyn'
include/linux/elf.h:170: warning: data definition has no type or storage class
include/linux/elf.h:173: error: syntax error before 'Elf64_Sxword'
include/linux/elf.h:173: warning: no semicolon at end of struct or union
include/linux/elf.h:175: error: syntax error before 'Elf64_Xword'
include/linux/elf.h:175: warning: no semicolon at end of struct or union
include/linux/elf.h:176: warning: type defaults to 'int' in declaration of 'd_ptr'
include/linux/elf.h:176: warning: data definition has no type or storage class
include/linux/elf.h:177: warning: type defaults to 'int' in declaration of 'd_un'
include/linux/elf.h:177: warning: data definition has no type or storage class
include/linux/elf.h:178: error: syntax error before '}' token
include/linux/elf.h:178: warning: type defaults to 'int' in declaration of 'Elf64_Dyn'
include/linux/elf.h:178: warning: data definition has no type or storage class
include/linux/elf.h:188: error: syntax error before 'Elf32_Addr'
include/linux/elf.h:188: warning: no semicolon at end of struct or union
include/linux/elf.h:189: warning: type defaults to 'int' in declaration of 'r_info'
include/linux/elf.h:189: warning: data definition has no type or storage class
include/linux/elf.h:190: warning: type defaults to 'int' in declaration of 'Elf32_Rel'
include/linux/elf.h:190: warning: data definition has no type or storage class
include/linux/elf.h:193: error: syntax error before 'Elf64_Addr'
include/linux/elf.h:193: warning: no semicolon at end of struct or union
include/linux/elf.h:194: warning: type defaults to 'int' in declaration of 'r_info'
include/linux/elf.h:194: warning: data definition has no type or storage class
include/linux/elf.h:195: warning: type defaults to 'int' in declaration of 'Elf64_Rel'
include/linux/elf.h:195: warning: data definition has no type or storage class
include/linux/elf.h:198: error: syntax error before 'Elf32_Addr'
include/linux/elf.h:198: warning: no semicolon at end of struct or union
include/linux/elf.h:199: warning: type defaults to 'int' in declaration of 'r_info'
include/linux/elf.h:199: warning: data definition has no type or storage class
include/linux/elf.h:200: error: syntax error before 'r_addend'
include/linux/elf.h:200: warning: type defaults to 'int' in declaration of 'r_addend'
include/linux/elf.h:200: warning: data definition has no type or storage class
include/linux/elf.h:201: warning: type defaults to 'int' in declaration of 'Elf32_Rela'
include/linux/elf.h:201: warning: data definition has no type or storage class
include/linux/elf.h:204: error: syntax error before 'Elf64_Addr'
include/linux/elf.h:204: warning: no semicolon at end of struct or union
include/linux/elf.h:205: warning: type defaults to 'int' in declaration of 'r_info'
include/linux/elf.h:205: warning: data definition has no type or storage class
include/linux/elf.h:206: error: syntax error before 'r_addend'
include/linux/elf.h:206: warning: type defaults to 'int' in declaration of 'r_addend'
include/linux/elf.h:206: warning: data definition has no type or storage class
include/linux/elf.h:207: warning: type defaults to 'int' in declaration of 'Elf64_Rela'
include/linux/elf.h:207: warning: data definition has no type or storage class
include/linux/elf.h:210: error: syntax error before 'Elf32_Word'
include/linux/elf.h:210: warning: no semicolon at end of struct or union
include/linux/elf.h:211: warning: type defaults to 'int' in declaration of 'st_value'
include/linux/elf.h:211: warning: data definition has no type or storage class
include/linux/elf.h:212: error: syntax error before 'st_size'
include/linux/elf.h:212: warning: type defaults to 'int' in declaration of 'st_size'
include/linux/elf.h:212: warning: data definition has no type or storage class
include/linux/elf.h:215: error: syntax error before 'st_shndx'
include/linux/elf.h:215: warning: type defaults to 'int' in declaration of 'st_shndx'
include/linux/elf.h:215: warning: data definition has no type or storage class
include/linux/elf.h:216: warning: type defaults to 'int' in declaration of 'Elf32_Sym'
include/linux/elf.h:216: warning: data definition has no type or storage class
include/linux/elf.h:219: error: syntax error before 'Elf64_Word'
include/linux/elf.h:219: warning: no semicolon at end of struct or union
include/linux/elf.h:222: error: syntax error before 'st_shndx'
include/linux/elf.h:222: warning: type defaults to 'int' in declaration of 'st_shndx'
include/linux/elf.h:222: warning: data definition has no type or storage class
include/linux/elf.h:223: error: syntax error before 'st_value'
include/linux/elf.h:223: warning: type defaults to 'int' in declaration of 'st_value'
include/linux/elf.h:223: warning: data definition has no type or storage class
include/linux/elf.h:224: error: syntax error before 'st_size'
include/linux/elf.h:224: warning: type defaults to 'int' in declaration of 'st_size'
include/linux/elf.h:224: warning: data definition has no type or storage class
include/linux/elf.h:225: warning: type defaults to 'int' in declaration of 'Elf64_Sym'
include/linux/elf.h:225: warning: data definition has no type or storage class
include/linux/elf.h:232: error: syntax error before 'Elf32_Half'
include/linux/elf.h:232: warning: no semicolon at end of struct or union
include/linux/elf.h:233: warning: type defaults to 'int' in declaration of 'e_machine'
include/linux/elf.h:233: warning: data definition has no type or storage class
include/linux/elf.h:234: error: syntax error before 'e_version'
include/linux/elf.h:234: warning: type defaults to 'int' in declaration of 'e_version'
include/linux/elf.h:234: warning: data definition has no type or storage class
include/linux/elf.h:235: error: syntax error before 'e_entry'
include/linux/elf.h:235: warning: type defaults to 'int' in declaration of 'e_entry'
include/linux/elf.h:235: warning: data definition has no type or storage class
include/linux/elf.h:236: error: syntax error before 'e_phoff'
include/linux/elf.h:236: warning: type defaults to 'int' in declaration of 'e_phoff'
include/linux/elf.h:236: warning: data definition has no type or storage class
include/linux/elf.h:237: error: syntax error before 'e_shoff'
include/linux/elf.h:237: warning: type defaults to 'int' in declaration of 'e_shoff'
include/linux/elf.h:237: warning: data definition has no type or storage class
include/linux/elf.h:238: error: syntax error before 'e_flags'
include/linux/elf.h:238: warning: type defaults to 'int' in declaration of 'e_flags'
include/linux/elf.h:238: warning: data definition has no type or storage class
include/linux/elf.h:239: error: syntax error before 'e_ehsize'
include/linux/elf.h:239: warning: type defaults to 'int' in declaration of 'e_ehsize'
include/linux/elf.h:239: warning: data definition has no type or storage class
include/linux/elf.h:240: error: syntax error before 'e_phentsize'
include/linux/elf.h:240: warning: type defaults to 'int' in declaration of 'e_phentsize'
include/linux/elf.h:240: warning: data definition has no type or storage class
include/linux/elf.h:241: error: syntax error before 'e_phnum'
include/linux/elf.h:241: warning: type defaults to 'int' in declaration of 'e_phnum'
include/linux/elf.h:241: warning: data definition has no type or storage class
include/linux/elf.h:242: error: syntax error before 'e_shentsize'
include/linux/elf.h:242: warning: type defaults to 'int' in declaration of 'e_shentsize'
include/linux/elf.h:242: warning: data definition has no type or storage class
include/linux/elf.h:243: error: syntax error before 'e_shnum'
include/linux/elf.h:243: warning: type defaults to 'int' in declaration of 'e_shnum'
include/linux/elf.h:243: warning: data definition has no type or storage class
include/linux/elf.h:244: error: syntax error before 'e_shstrndx'
include/linux/elf.h:244: warning: type defaults to 'int' in declaration of 'e_shstrndx'
include/linux/elf.h:244: warning: data definition has no type or storage class
include/linux/elf.h:245: warning: type defaults to 'int' in declaration of 'Elf32_Ehdr'
include/linux/elf.h:245: warning: data definition has no type or storage class
include/linux/elf.h:249: error: syntax error before 'Elf64_Half'
include/linux/elf.h:249: warning: no semicolon at end of struct or union
include/linux/elf.h:250: warning: type defaults to 'int' in declaration of 'e_machine'
include/linux/elf.h:250: warning: data definition has no type or storage class
include/linux/elf.h:251: error: syntax error before 'e_version'
include/linux/elf.h:251: warning: type defaults to 'int' in declaration of 'e_version'
include/linux/elf.h:251: warning: data definition has no type or storage class
include/linux/elf.h:252: error: syntax error before 'e_entry'
include/linux/elf.h:252: warning: type defaults to 'int' in declaration of 'e_entry'
include/linux/elf.h:252: warning: data definition has no type or storage class
include/linux/elf.h:253: error: syntax error before 'e_phoff'
include/linux/elf.h:253: warning: type defaults to 'int' in declaration of 'e_phoff'
include/linux/elf.h:253: warning: data definition has no type or storage class
include/linux/elf.h:254: error: syntax error before 'e_shoff'
include/linux/elf.h:254: warning: type defaults to 'int' in declaration of 'e_shoff'
include/linux/elf.h:254: warning: data definition has no type or storage class
include/linux/elf.h:255: error: syntax error before 'e_flags'
include/linux/elf.h:255: warning: type defaults to 'int' in declaration of 'e_flags'
include/linux/elf.h:255: warning: data definition has no type or storage class
include/linux/elf.h:256: error: syntax error before 'e_ehsize'
include/linux/elf.h:256: warning: type defaults to 'int' in declaration of 'e_ehsize'
include/linux/elf.h:256: warning: data definition has no type or storage class
include/linux/elf.h:257: error: syntax error before 'e_phentsize'
include/linux/elf.h:257: warning: type defaults to 'int' in declaration of 'e_phentsize'
include/linux/elf.h:257: warning: data definition has no type or storage class
include/linux/elf.h:258: error: syntax error before 'e_phnum'
include/linux/elf.h:258: warning: type defaults to 'int' in declaration of 'e_phnum'
include/linux/elf.h:258: warning: data definition has no type or storage class
include/linux/elf.h:259: error: syntax error before 'e_shentsize'
include/linux/elf.h:259: warning: type defaults to 'int' in declaration of 'e_shentsize'
include/linux/elf.h:259: warning: data definition has no type or storage class
include/linux/elf.h:260: error: syntax error before 'e_shnum'
include/linux/elf.h:260: warning: type defaults to 'int' in declaration of 'e_shnum'
include/linux/elf.h:260: warning: data definition has no type or storage class
include/linux/elf.h:261: error: syntax error before 'e_shstrndx'
include/linux/elf.h:261: warning: type defaults to 'int' in declaration of 'e_shstrndx'
include/linux/elf.h:261: warning: data definition has no type or storage class
include/linux/elf.h:262: warning: type defaults to 'int' in declaration of 'Elf64_Ehdr'
include/linux/elf.h:262: warning: data definition has no type or storage class
include/linux/elf.h:271: error: syntax error before 'Elf32_Word'
include/linux/elf.h:271: warning: no semicolon at end of struct or union
include/linux/elf.h:272: warning: type defaults to 'int' in declaration of 'p_offset'
include/linux/elf.h:272: warning: data definition has no type or storage class
include/linux/elf.h:273: error: syntax error before 'p_vaddr'
include/linux/elf.h:273: warning: type defaults to 'int' in declaration of 'p_vaddr'
include/linux/elf.h:273: warning: data definition has no type or storage class
include/linux/elf.h:274: error: syntax error before 'p_paddr'
include/linux/elf.h:274: warning: type defaults to 'int' in declaration of 'p_paddr'
include/linux/elf.h:274: warning: data definition has no type or storage class
include/linux/elf.h:275: error: syntax error before 'p_filesz'
include/linux/elf.h:275: warning: type defaults to 'int' in declaration of 'p_filesz'
include/linux/elf.h:275: warning: data definition has no type or storage class
include/linux/elf.h:276: error: syntax error before 'p_memsz'
include/linux/elf.h:276: warning: type defaults to 'int' in declaration of 'p_memsz'
include/linux/elf.h:276: warning: data definition has no type or storage class
include/linux/elf.h:277: error: syntax error before 'p_flags'
include/linux/elf.h:277: warning: type defaults to 'int' in declaration of 'p_flags'
include/linux/elf.h:277: warning: data definition has no type or storage class
include/linux/elf.h:278: error: syntax error before 'p_align'
include/linux/elf.h:278: warning: type defaults to 'int' in declaration of 'p_align'
include/linux/elf.h:278: warning: data definition has no type or storage class
include/linux/elf.h:279: warning: type defaults to 'int' in declaration of 'Elf32_Phdr'
include/linux/elf.h:279: warning: data definition has no type or storage class
include/linux/elf.h:282: error: syntax error before 'Elf64_Word'
include/linux/elf.h:282: warning: no semicolon at end of struct or union
include/linux/elf.h:283: warning: type defaults to 'int' in declaration of 'p_flags'
include/linux/elf.h:283: warning: data definition has no type or storage class
include/linux/elf.h:284: error: syntax error before 'p_offset'
include/linux/elf.h:284: warning: type defaults to 'int' in declaration of 'p_offset'
include/linux/elf.h:284: warning: data definition has no type or storage class
include/linux/elf.h:285: error: syntax error before 'p_vaddr'
include/linux/elf.h:285: warning: type defaults to 'int' in declaration of 'p_vaddr'
include/linux/elf.h:285: warning: data definition has no type or storage class
include/linux/elf.h:286: error: syntax error before 'p_paddr'
include/linux/elf.h:286: warning: type defaults to 'int' in declaration of 'p_paddr'
include/linux/elf.h:286: warning: data definition has no type or storage class
include/linux/elf.h:287: error: syntax error before 'p_filesz'
include/linux/elf.h:287: warning: type defaults to 'int' in declaration of 'p_filesz'
include/linux/elf.h:287: warning: data definition has no type or storage class
include/linux/elf.h:288: error: syntax error before 'p_memsz'
include/linux/elf.h:288: warning: type defaults to 'int' in declaration of 'p_memsz'
include/linux/elf.h:288: warning: data definition has no type or storage class
include/linux/elf.h:289: error: syntax error before 'p_align'
include/linux/elf.h:289: warning: type defaults to 'int' in declaration of 'p_align'
include/linux/elf.h:289: warning: data definition has no type or storage class
include/linux/elf.h:290: warning: type defaults to 'int' in declaration of 'Elf64_Phdr'
include/linux/elf.h:290: warning: data definition has no type or storage class
include/linux/elf.h:327: error: syntax error before 'Elf32_Word'
include/linux/elf.h:327: warning: no semicolon at end of struct or union
include/linux/elf.h:328: warning: type defaults to 'int' in declaration of 'sh_type'
include/linux/elf.h:328: warning: data definition has no type or storage class
include/linux/elf.h:329: error: syntax error before 'sh_flags'
include/linux/elf.h:329: warning: type defaults to 'int' in declaration of 'sh_flags'
include/linux/elf.h:329: warning: data definition has no type or storage class
include/linux/elf.h:330: error: syntax error before 'sh_addr'
include/linux/elf.h:330: warning: type defaults to 'int' in declaration of 'sh_addr'
include/linux/elf.h:330: warning: data definition has no type or storage class
include/linux/elf.h:331: error: syntax error before 'sh_offset'
include/linux/elf.h:331: warning: type defaults to 'int' in declaration of 'sh_offset'
include/linux/elf.h:331: warning: data definition has no type or storage class
include/linux/elf.h:332: error: syntax error before 'sh_size'
include/linux/elf.h:332: warning: type defaults to 'int' in declaration of 'sh_size'
include/linux/elf.h:332: warning: data definition has no type or storage class
include/linux/elf.h:333: error: syntax error before 'sh_link'
include/linux/elf.h:333: warning: type defaults to 'int' in declaration of 'sh_link'
include/linux/elf.h:333: warning: data definition has no type or storage class
include/linux/elf.h:334: error: syntax error before 'sh_info'
include/linux/elf.h:334: warning: type defaults to 'int' in declaration of 'sh_info'
include/linux/elf.h:334: warning: data definition has no type or storage class
include/linux/elf.h:335: error: syntax error before 'sh_addralign'
include/linux/elf.h:335: warning: type defaults to 'int' in declaration of 'sh_addralign'
include/linux/elf.h:335: warning: data definition has no type or storage class
include/linux/elf.h:336: error: syntax error before 'sh_entsize'
include/linux/elf.h:336: warning: type defaults to 'int' in declaration of 'sh_entsize'
include/linux/elf.h:336: warning: data definition has no type or storage class
include/linux/elf.h:337: warning: type defaults to 'int' in declaration of 'Elf32_Shdr'
include/linux/elf.h:337: warning: data definition has no type or storage class
include/linux/elf.h:340: error: syntax error before 'Elf64_Word'
include/linux/elf.h:340: warning: no semicolon at end of struct or union
include/linux/elf.h:341: warning: type defaults to 'int' in declaration of 'sh_type'
include/linux/elf.h:341: warning: data definition has no type or storage class
include/linux/elf.h:342: error: syntax error before 'sh_flags'
include/linux/elf.h:342: warning: type defaults to 'int' in declaration of 'sh_flags'
include/linux/elf.h:342: warning: data definition has no type or storage class
include/linux/elf.h:343: error: syntax error before 'sh_addr'
include/linux/elf.h:343: warning: type defaults to 'int' in declaration of 'sh_addr'
include/linux/elf.h:343: warning: data definition has no type or storage class
include/linux/elf.h:344: error: syntax error before 'sh_offset'
include/linux/elf.h:344: warning: type defaults to 'int' in declaration of 'sh_offset'
include/linux/elf.h:344: warning: data definition has no type or storage class
include/linux/elf.h:345: error: syntax error before 'sh_size'
include/linux/elf.h:345: warning: type defaults to 'int' in declaration of 'sh_size'
include/linux/elf.h:345: warning: data definition has no type or storage class
include/linux/elf.h:346: error: syntax error before 'sh_link'
include/linux/elf.h:346: warning: type defaults to 'int' in declaration of 'sh_link'
include/linux/elf.h:346: warning: data definition has no type or storage class
include/linux/elf.h:347: error: syntax error before 'sh_info'
include/linux/elf.h:347: warning: type defaults to 'int' in declaration of 'sh_info'
include/linux/elf.h:347: warning: data definition has no type or storage class
include/linux/elf.h:348: error: syntax error before 'sh_addralign'
include/linux/elf.h:348: warning: type defaults to 'int' in declaration of 'sh_addralign'
include/linux/elf.h:348: warning: data definition has no type or storage class
include/linux/elf.h:349: error: syntax error before 'sh_entsize'
include/linux/elf.h:349: warning: type defaults to 'int' in declaration of 'sh_entsize'
include/linux/elf.h:349: warning: data definition has no type or storage class
include/linux/elf.h:350: warning: type defaults to 'int' in declaration of 'Elf64_Shdr'
include/linux/elf.h:350: warning: data definition has no type or storage class
include/linux/elf.h:400: error: syntax error before 'Elf32_Word'
include/linux/elf.h:400: warning: no semicolon at end of struct or union
include/linux/elf.h:401: warning: type defaults to 'int' in declaration of 'n_descsz'
include/linux/elf.h:401: warning: data definition has no type or storage class
include/linux/elf.h:402: error: syntax error before 'n_type'
include/linux/elf.h:402: warning: type defaults to 'int' in declaration of 'n_type'
include/linux/elf.h:402: warning: data definition has no type or storage class
include/linux/elf.h:403: warning: type defaults to 'int' in declaration of 'Elf32_Nhdr'
include/linux/elf.h:403: warning: data definition has no type or storage class
include/linux/elf.h:407: error: syntax error before 'Elf64_Word'
include/linux/elf.h:407: warning: no semicolon at end of struct or union
include/linux/elf.h:408: warning: type defaults to 'int' in declaration of 'n_descsz'
include/linux/elf.h:408: warning: data definition has no type or storage class
include/linux/elf.h:409: error: syntax error before 'n_type'
include/linux/elf.h:409: warning: type defaults to 'int' in declaration of 'n_type'
include/linux/elf.h:409: warning: data definition has no type or storage class
include/linux/elf.h:410: warning: type defaults to 'int' in declaration of 'Elf64_Nhdr'
include/linux/elf.h:410: warning: data definition has no type or storage class
include/linux/elf.h:412:5: warning: "ELF_CLASS" is not defined
include/linux/elf.h:421: error: syntax error before '_DYNAMIC'
include/linux/elf.h:421: warning: type defaults to 'int' in declaration of '_DYNAMIC'
include/linux/elf.h:421: warning: data definition has no type or storage class
In file included from include/linux/kobject.h:22,
                 from include/linux/module.h:19,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/sysfs.h:21: error: syntax error before 'mode_t'
include/linux/sysfs.h:21: warning: no semicolon at end of struct or union
include/linux/sysfs.h:54: error: field 'attr' has incomplete type
include/linux/sysfs.h:55: error: syntax error before 'size_t'
include/linux/sysfs.h:55: warning: no semicolon at end of struct or union
include/linux/sysfs.h:57: error: syntax error before '*' token
include/linux/sysfs.h:57: error: syntax error before 'loff_t'
include/linux/sysfs.h:57: warning: type defaults to 'int' in declaration of 'ssize_t'
include/linux/sysfs.h:57: warning: function declaration isn't a prototype
include/linux/sysfs.h:57: error: 'ssize_t' declared as function returning a function
include/linux/sysfs.h:57: warning: function declaration isn't a prototype
include/linux/sysfs.h:57: error: 'ssize_t' redeclared as different kind of symbol
include/linux/types.h:71: error: previous declaration of 'ssize_t' was here
include/linux/sysfs.h:57: warning: data definition has no type or storage class
include/linux/sysfs.h:58: error: syntax error before '*' token
include/linux/sysfs.h:58: error: syntax error before 'loff_t'
include/linux/sysfs.h:58: warning: type defaults to 'int' in declaration of 'ssize_t'
include/linux/sysfs.h:58: warning: function declaration isn't a prototype
include/linux/sysfs.h:58: error: 'ssize_t' declared as function returning a function
include/linux/sysfs.h:58: warning: function declaration isn't a prototype
include/linux/sysfs.h:58: error: 'ssize_t' redeclared as different kind of symbol
include/linux/types.h:71: error: previous declaration of 'ssize_t' was here
include/linux/sysfs.h:58: warning: data definition has no type or storage class
include/linux/sysfs.h:61: error: syntax error before '}' token
include/linux/sysfs.h:64: error: syntax error before 'ssize_t'
include/linux/sysfs.h:64: warning: no semicolon at end of struct or union
include/linux/sysfs.h:65: error: syntax error before '*' token
include/linux/sysfs.h:65: error: syntax error before 'size_t'
include/linux/sysfs.h:65: warning: type defaults to 'int' in declaration of 'ssize_t'
include/linux/sysfs.h:65: warning: function declaration isn't a prototype
include/linux/sysfs.h:65: error: 'ssize_t' declared as function returning a function
include/linux/sysfs.h:65: warning: function declaration isn't a prototype
include/linux/sysfs.h:65: error: 'ssize_t' redeclared as different kind of symbol
include/linux/types.h:71: error: previous declaration of 'ssize_t' was here
include/linux/sysfs.h:65: warning: data definition has no type or storage class
include/linux/sysfs.h:69: error: syntax error before 'atomic_t'
include/linux/sysfs.h:69: warning: no semicolon at end of struct or union
include/linux/sysfs.h:74: error: syntax error before 's_mode'
include/linux/sysfs.h:74: warning: type defaults to 'int' in declaration of 's_mode'
include/linux/sysfs.h:74: warning: data definition has no type or storage class
include/linux/sysfs.h:77: error: syntax error before 's_event'
include/linux/sysfs.h:77: warning: type defaults to 'int' in declaration of 's_event'
include/linux/sysfs.h:77: warning: data definition has no type or storage class
include/linux/sysfs.h:105: error: syntax error before 'mode_t'
include/linux/sysfs.h:105: warning: function declaration isn't a prototype
In file included from include/linux/kobject.h:25,
                 from include/linux/module.h:19,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/kref.h:24: error: syntax error before 'atomic_t'
include/linux/kref.h:24: warning: no semicolon at end of struct or union
In file included from include/linux/module.h:19,
                 from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/kobject.h:37: error: syntax error before 'uevent_seqnum'
include/linux/kobject.h:37: warning: type defaults to 'int' in declaration of 'uevent_seqnum'
include/linux/kobject.h:37: warning: data definition has no type or storage class
include/linux/kobject.h:54: error: field 'kref' has incomplete type
include/linux/kobject.h:171: error: field 'rwsem' has incomplete type
include/linux/kobject.h:254: error: field 'attr' has incomplete type
include/linux/kobject.h:255: error: syntax error before 'ssize_t'
include/linux/kobject.h:255: warning: no semicolon at end of struct or union
include/linux/kobject.h:256: error: syntax error before '*' token
include/linux/kobject.h:256: error: syntax error before 'size_t'
include/linux/kobject.h:256: warning: type defaults to 'int' in declaration of 'ssize_t'
include/linux/kobject.h:256: warning: function declaration isn't a prototype
include/linux/kobject.h:256: error: 'ssize_t' declared as function returning a function
include/linux/kobject.h:256: warning: function declaration isn't a prototype
include/linux/kobject.h:256: error: 'ssize_t' redeclared as different kind of symbol
include/linux/types.h:71: error: previous declaration of 'ssize_t' was here
include/linux/kobject.h:256: warning: data definition has no type or storage class
In file included from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/module.h:21:23: error: asm/local.h: 没有那个文件或目录
include/linux/module.h:23:24: error: asm/module.h: 没有那个文件或目录
In file included from /home/huyongzs/computerstudy/ftp/misc-modules/hello.c:2:
include/linux/module.h:50: error: field 'attr' has incomplete type
include/linux/module.h:51: error: syntax error before 'ssize_t'
include/linux/module.h:51: warning: no semicolon at end of struct or union
include/linux/module.h:52: error: syntax error before '*' token
include/linux/module.h:53: error: syntax error before 'size_t'
include/linux/module.h:53: warning: type defaults to 'int' in declaration of 'ssize_t'
include/linux/module.h:53: warning: function declaration isn't a prototype
include/linux/module.h:53: error: 'ssize_t' declared as function returning a function
include/linux/module.h:53: warning: function declaration isn't a prototype
include/linux/module.h:53: error: 'ssize_t' redeclared as different kind of symbol
include/linux/types.h:71: error: previous declaration of 'ssize_t' was here
include/linux/module.h:53: warning: data definition has no type or storage class
include/linux/module.h:57: error: syntax error before '}' token
include/linux/module.h:209: error: syntax error before 'local_t'
include/linux/module.h:209: warning: no semicolon at end of struct or union
include/linux/module.h:210: warning: empty declaration
include/linux/module.h:223: error: field 'mattr' has incomplete type
include/linux/module.h:288: error: field 'arch' has incomplete type
include/linux/module.h:298: error: array type has incomplete element type
include/linux/module.h:312: error: syntax error before 'Elf_Sym'
include/linux/module.h:312: warning: no semicolon at end of struct or union
include/linux/module.h:326: error: syntax error before '}' token
include/linux/module.h: In function 'module_is_live':
include/linux/module.h:333: error: dereferencing pointer to incomplete type
include/linux/module.h: In function '__module_get':
include/linux/module.h:368: warning: implicit declaration of function 'local_inc'
include/linux/module.h:368: error: dereferencing pointer to incomplete type
include/linux/module.h: In function 'try_module_get':
include/linux/module.h:380: error: dereferencing pointer to incomplete type
include/linux/module.h: In function 'module_put':
include/linux/module.h:392: warning: implicit declaration of function 'local_dec'
include/linux/module.h:392: error: dereferencing pointer to incomplete type
include/linux/module.h:395: error: dereferencing pointer to incomplete type
make[1]: *** [/home/huyongzs/computerstudy/ftp/misc-modules/hello.o] 错误 1
make: *** [_module_/home/huyongzs/computerstudy/ftp/misc-modules] 错误 2
make: Leaving directory `/usr/src/linux-2.6.17'
回复 支持 反对

使用道具 举报

发表于 2006-12-31 10:01:01 | 显示全部楼层
make -C /usr/src/linux-2.6.17/ M=`pwd` modules
把最后一个斜杠去掉试试
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表