모듈을 올리고 싶은데요..
1.우분투 커널 2.6.24-21 사용중인데요,
#include 했더니 파일이 없다고 나오네요..
apt-get upgrade 도 해보고
apt-get install linux-source 도 해보고
header-generic 인가도 설치해보았으나 여전히 파일이 없네요.
어떻게 하죠 ㅠㅠ
2./usr/include/linux/module.h 가 제대로 설치된 서버에 접속해서 코드를 작성후 컴파일 하려니까..
(위에는 잘림)
from /usr/include/linux/lockdep.h:12,
from /usr/include/linux/spinlock_types.h:12,
from /usr/include/linux/spinlock.h:85,
from /usr/include/linux/capability.h:45,
from /usr/include/linux/sched.h:44,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/prefetch.h:58: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/prefetch.h: In function 'prefetch_range':
/usr/include/linux/prefetch.h:62: error: 'len' undeclared (first use in this function)
In file included from /usr/include/linux/timex.h:57,
from /usr/include/linux/sched.h:48,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/time.h: At top level:
/usr/include/linux/time.h:17: error: expected specifier-qualifier-list before 'time_t'
/usr/include/linux/time.h:23: error: expected specifier-qualifier-list before 'time_t'
/usr/include/linux/time.h: In function 'timespec_equal':
/usr/include/linux/time.h:45: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:45: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:45: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h:45: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h: In function 'timespec_compare':
/usr/include/linux/time.h:55: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:55: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:57: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:57: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:59: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h:59: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h: In function 'timeval_compare':
/usr/include/linux/time.h:64: error: 'struct timeval' has no member named 'tv_sec'
/usr/include/linux/time.h:64: error: 'struct timeval' has no member named 'tv_sec'
/usr/include/linux/time.h:66: error: 'struct timeval' has no member named 'tv_sec'
/usr/include/linux/time.h:66: error: 'struct timeval' has no member named 'tv_sec'
/usr/include/linux/time.h:68: error: 'struct timeval' has no member named 'tv_usec'
/usr/include/linux/time.h:68: error: 'struct timeval' has no member named 'tv_usec'
/usr/include/linux/time.h: At top level:
/usr/include/linux/time.h:75: error: expected declaration specifiers or '...' before 'time_t'
/usr/include/linux/time.h: In function 'timespec_sub':
/usr/include/linux/time.h:84: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:84: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:85: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h:85: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h:85: error: too many arguments to function 'set_normalized_timespec'
/usr/include/linux/time.h: In function 'get_seconds':
/usr/include/linux/time.h:103: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h: In function 'timespec_to_ns':
/usr/include/linux/time.h:135: error: 'const struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:135: error: 'const struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h: In function 'timeval_to_ns':
/usr/include/linux/time.h:147: error: 'const struct timeval' has no member named 'tv_sec'
/usr/include/linux/time.h:148: error: 'const struct timeval' has no member named 'tv_usec'
/usr/include/linux/time.h: In function 'timespec_add_ns':
/usr/include/linux/time.h:174: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/time.h:177: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/time.h:179: error: 'struct timespec' has no member named 'tv_nsec'
In file included from /usr/include/linux/sched.h:49,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/jiffies.h: In function 'timespec_to_jiffies':
/usr/include/linux/jiffies.h:314: error: 'const struct timespec' has no member named 'tv_sec'
/usr/include/linux/jiffies.h:315: error: 'const struct timespec' has no member named 'tv_nsec'
/usr/include/linux/jiffies.h: In function 'jiffies_to_timespec':
/usr/include/linux/jiffies.h:335: error: 'struct timespec' has no member named 'tv_sec'
/usr/include/linux/jiffies.h:335: error: 'struct timespec' has no member named 'tv_nsec'
/usr/include/linux/jiffies.h: In function 'timeval_to_jiffies':
/usr/include/linux/jiffies.h:353: error: 'const struct timeval' has no member named 'tv_sec'
/usr/include/linux/jiffies.h:354: error: 'const struct timeval' has no member named 'tv_usec'
/usr/include/linux/jiffies.h: In function 'jiffies_to_timeval':
/usr/include/linux/jiffies.h:375: error: 'struct timeval' has no member named 'tv_sec'
/usr/include/linux/jiffies.h:377: error: 'struct timeval' has no member named 'tv_usec'
/usr/include/linux/jiffies.h: At top level:
/usr/include/linux/jiffies.h:383: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'jiffies_to_clock_t'
In file included from /usr/include/asm/rwsem.h:8,
from /usr/include/linux/rwsem.h:24,
from /usr/include/asm-i486/semaphore.h:42,
from /usr/include/asm/semaphore.h:8,
from /usr/include/linux/sched.h:57,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/rwsem.h: In function '__down_read':
/usr/include/asm-i486/rwsem.h:104: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/rwsem.h: In function '__down_write_nested':
/usr/include/asm-i486/rwsem.h:156: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/rwsem.h: In function '__up_read':
/usr/include/asm-i486/rwsem.h:198: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/rwsem.h: In function '__up_write':
/usr/include/asm-i486/rwsem.h:224: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/rwsem.h: In function '__downgrade_write':
/usr/include/asm-i486/rwsem.h:249: error: expected ':' or ')' before 'KBUILD_BASENAME'
In file included from /usr/include/asm/semaphore.h:8,
from /usr/include/linux/sched.h:57,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/semaphore.h: In function 'down':
/usr/include/asm-i486/semaphore.h:105: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/semaphore.h: In function 'down_interruptible':
/usr/include/asm-i486/semaphore.h:130: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/semaphore.h: In function 'down_trylock':
/usr/include/asm-i486/semaphore.h:155: error: expected ':' or ')' before 'KBUILD_BASENAME'
/usr/include/asm-i486/semaphore.h: In function 'up':
/usr/include/asm-i486/semaphore.h:179: error: expected ':' or ')' before 'KBUILD_BASENAME'
In file included from /usr/include/asm/acpi.h:8,
from /usr/include/asm-i486/fixmap.h:26,
from /usr/include/asm/fixmap.h:8,
from /usr/include/asm-i486/smp.h:15,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:18,
from /usr/include/linux/sched.h:63,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/acpi.h:31:28: error: acpi/pdc_intel.h: �� �����̳� �����丮�� �
In file included from /usr/include/asm/mpspec.h:8,
from /usr/include/asm-i486/smp.h:17,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:18,
from /usr/include/linux/sched.h:63,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/mpspec.h:6:25: error: mach_mpspec.h: �� �����̳� �����丮�� �
In file included from /usr/include/asm/mpspec.h:8,
from /usr/include/asm-i486/smp.h:17,
from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:18,
from /usr/include/linux/sched.h:63,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/mpspec.h: At top level:
/usr/include/asm-i486/mpspec.h:8: error: 'MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm-i486/mpspec.h:22: error: 'MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from /usr/include/asm/smp.h:8,
from /usr/include/linux/smp.h:18,
from /usr/include/linux/sched.h:63,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/smp.h:76:26: error: mach_apicdef.h: �� �����̳� �����丮�� �
In file included from /usr/include/linux/sem.h:4,
from /usr/include/linux/sched.h:64,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/ipc.h:61: error: expected specifier-qualifier-list before 'key_t'
In file included from /usr/include/linux/sched.h:64,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/sem.h:94: error: expected specifier-qualifier-list before 'time_t'
In file included from /usr/include/asm/signal.h:8,
from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:65,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-i486/signal.h:154: error: expected specifier-qualifier-list before 'size_t'
In file included from /usr/include/asm-i486/siginfo.h:4,
from /usr/include/asm/siginfo.h:8,
from /usr/include/linux/signal.h:5,
from /usr/include/linux/sched.h:65,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/asm-generic/siginfo.h:50: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/asm-generic/siginfo.h:56: error: expected specifier-qualifier-list before 'timer_t'
/usr/include/asm-generic/siginfo.h:65: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/asm-generic/siginfo.h:72: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/asm-generic/siginfo.h: In function 'copy_siginfo':
/usr/include/asm-generic/siginfo.h:282: error: too many arguments to function '__constant_memcpy'
/usr/include/asm-generic/siginfo.h:282: error: too many arguments to function '__memcpy'
/usr/include/asm-generic/siginfo.h:285: error: too many arguments to function '__constant_memcpy'
/usr/include/asm-generic/siginfo.h:285: error: too many arguments to function '__memcpy'
In file included from /usr/include/linux/sched.h:65,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/signal.h: In function 'sigemptyset':
/usr/include/linux/signal.h:159: error: too many arguments to function '__constant_c_and_count_memset'
/usr/include/linux/signal.h:159: error: too many arguments to function '__constant_c_memset'
/usr/include/linux/signal.h:159: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h:159: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h: In function 'sigfillset':
/usr/include/linux/signal.h:171: error: too many arguments to function '__constant_c_and_count_memset'
/usr/include/linux/signal.h:171: error: too many arguments to function '__constant_c_memset'
/usr/include/linux/signal.h:171: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h:171: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h: In function 'siginitset':
/usr/include/linux/signal.h:201: error: too many arguments to function '__constant_c_and_count_memset'
/usr/include/linux/signal.h:201: error: too many arguments to function '__constant_c_memset'
/usr/include/linux/signal.h:201: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h:201: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h: In function 'siginitsetinv':
/usr/include/linux/signal.h:213: error: too many arguments to function '__constant_c_and_count_memset'
/usr/include/linux/signal.h:213: error: too many arguments to function '__constant_c_memset'
/usr/include/linux/signal.h:213: error: too many arguments to function '__memset_generic'
/usr/include/linux/signal.h:213: error: too many arguments to function '__memset_generic'
In file included from /usr/include/linux/gfp.h:4,
from /usr/include/linux/slab.h:14,
from /usr/include/linux/percpu.h:4,
from /usr/include/linux/rcupdate.h:41,
from /usr/include/linux/pid.h:4,
from /usr/include/linux/sched.h:70,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/mmzone.h: At top level:
/usr/include/linux/mmzone.h:416: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/mmzone.h:416: error: expected declaration specifiers or '...' before 'loff_t'
/usr/include/linux/mmzone.h:419: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/mmzone.h:419: error: expected declaration specifiers or '...' before 'loff_t'
/usr/include/linux/mmzone.h:421: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/mmzone.h:421: error: expected declaration specifiers or '...' before 'loff_t'
/usr/include/linux/mmzone.h:423: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/mmzone.h:423: error: expected declaration specifiers or '...' before 'loff_t'
In file included from /usr/include/linux/percpu.h:4,
from /usr/include/linux/rcupdate.h:41,
from /usr/include/linux/pid.h:4,
from /usr/include/linux/sched.h:70,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/slab.h:60: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/slab.h:60: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/linux/slab.h:70: error: expected ')' before 'size'
/usr/include/linux/slab.h:74: error: expected specifier-qualifier-list before 'size_t'
/usr/include/linux/slab.h:80: error: expected ')' before 'gfp_t'
/usr/include/linux/slab.h:134: error: expected ')' before 'size'
In file included from /usr/include/linux/percpu.h:4,
from /usr/include/linux/rcupdate.h:41,
from /usr/include/linux/pid.h:4,
from /usr/include/linux/sched.h:70,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/slab.h:157: error: expected ')' before 'gfp_t'
/usr/include/linux/slab.h:164: error: expected ')' before 'size'
In file included from /usr/include/linux/percpu.h:4,
from /usr/include/linux/rcupdate.h:41,
from /usr/include/linux/pid.h:4,
from /usr/include/linux/sched.h:70,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/slab.h:193: error: expected ')' before 'n'
/usr/include/linux/slab.h:212: error: expected ')' before 'size'
In file included from /usr/include/linux/rcupdate.h:41,
from /usr/include/linux/pid.h:4,
from /usr/include/linux/sched.h:70,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/percpu.h:35: error: expected ')' before 'size'
In file included from /usr/include/linux/hrtimer.h:19,
from /usr/include/linux/sched.h:82,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/ktime.h: In function 'timespec_to_ktime':
/usr/include/linux/ktime.h:204: error: 'const struct timespec' has no member named 'tv_sec'
/usr/include/linux/ktime.h:205: error: 'const struct timespec' has no member named 'tv_nsec'
/usr/include/linux/ktime.h: In function 'timeval_to_ktime':
/usr/include/linux/ktime.h:216: error: 'const struct timeval' has no member named 'tv_sec'
/usr/include/linux/ktime.h:217: error: 'const struct timeval' has no member named 'tv_usec'
/usr/include/linux/ktime.h: In function 'ktime_to_timespec':
/usr/include/linux/ktime.h:228: error: unknown field 'tv_sec' specified in initializer
/usr/include/linux/ktime.h:228: error: 'time_t' undeclared (first use in this function)
/usr/include/linux/ktime.h:228: error: expected '}' before 'kt'
/usr/include/linux/ktime.h: In function 'ktime_to_timeval':
/usr/include/linux/ktime.h:241: error: unknown field 'tv_sec' specified in initializer
/usr/include/linux/ktime.h:241: error: 'time_t' undeclared (first use in this function)
/usr/include/linux/ktime.h:241: error: expected '}' before 'kt'
In file included from /usr/include/linux/sched.h:82,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/hrtimer.h: At top level:
/usr/include/linux/hrtimer.h:86: error: expected specifier-qualifier-list before 'clockid_t'
/usr/include/linux/hrtimer.h:108: error: expected declaration specifiers or '...' before 'clockid_t'
/usr/include/linux/hrtimer.h:121: error: expected ';', ',' or ')' before 'which_clock'
/usr/include/linux/hrtimer.h:140: error: expected ';', ',' or ')' before 'clockid'
In file included from /usr/include/linux/sched.h:248,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/aio.h:94: error: expected specifier-qualifier-list before 'ssize_t'
/usr/include/linux/aio.h:199: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'wait_on_sync_kiocb'
/usr/include/linux/aio.h: In function 'list_kiocb':
/usr/include/linux/aio.h:243: error: 'struct kiocb' has no member named 'ki_list'
/usr/include/linux/aio.h:243: error: 'struct kiocb' has no member named 'ki_list'
In file included from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:418: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/linux/sched.h:533: error: expected specifier-qualifier-list before 'uid_t'
/usr/include/linux/sched.h:720: error: expected specifier-qualifier-list before 'gid_t'
/usr/include/linux/sched.h:743: error: expected declaration specifiers or '...' before 'gid_t'
/usr/include/linux/sched.h:820: error: expected specifier-qualifier-list before 'pid_t'
/usr/include/linux/sched.h:1001: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'process_group'
/usr/include/linux/sched.h: In function 'pid_alive':
/usr/include/linux/sched.h:1016: error: 'struct task_struct' has no member named 'pids'
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:1167: error: expected ')' before 'session'
/usr/include/linux/sched.h:1168: error: expected ')' before 'session'
In file included from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/sched.h: In function 'dequeue_signal_lock':
/usr/include/linux/sched.h:1209: error: 'struct task_struct' has no member named 'sighand'
/usr/include/linux/sched.h:1211: error: 'struct task_struct' has no member named 'sighand'
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:1224: error: expected declaration specifiers or '...' before 'pid_t'
/usr/include/linux/sched.h:1225: error: expected declaration specifiers or '...' before 'pid_t'
/usr/include/linux/sched.h:1226: error: expected declaration specifiers or '...' before 'pid_t'
/usr/include/linux/sched.h:1227: error: expected declaration specifiers or '...' before 'pid_t'
/usr/include/linux/sched.h:1227: error: expected declaration specifiers or '...' before 'uid_t'
/usr/include/linux/sched.h:1227: error: expected declaration specifiers or '...' before 'uid_t'
/usr/include/linux/sched.h:1233: error: expected ')' before 'int'
/usr/include/linux/sched.h:1234: error: expected ')' before 'int'
/usr/include/linux/sched.h: In function 'on_sig_stack':
/usr/include/linux/sched.h:1256: error: 'struct task_struct' has no member named 'sas_ss_sp'
/usr/include/linux/sched.h:1256: error: 'struct task_struct' has no member named 'sas_ss_size'
/usr/include/linux/sched.h: In function 'sas_ss_flags':
/usr/include/linux/sched.h:1261: error: 'struct task_struct' has no member named 'sas_ss_size'
/usr/include/linux/sched.h: In function 'next_thread':
/usr/include/linux/sched.h:1337: error: 'struct task_struct' has no member named 'thread_group'
/usr/include/linux/sched.h:1337: error: 'const struct task_struct' has no member named 'thread_group'
/usr/include/linux/sched.h:1337: error: 'const struct task_struct' has no member named 'thread_group'
/usr/include/linux/sched.h:1337: error: 'struct task_struct' has no member named 'thread_group'
/usr/include/linux/sched.h: In function 'thread_group_empty':
/usr/include/linux/sched.h:1343: error: 'struct task_struct' has no member named 'thread_group'
/usr/include/linux/sched.h: In function 'task_lock':
/usr/include/linux/sched.h:1360: error: 'struct task_struct' has no member named 'alloc_lock'
/usr/include/linux/sched.h: In function 'task_unlock':
/usr/include/linux/sched.h:1365: error: 'struct task_struct' has no member named 'alloc_lock'
/usr/include/linux/sched.h: In function 'unlock_task_sighand':
/usr/include/linux/sched.h:1374: error: 'struct task_struct' has no member named 'sighand'
/usr/include/linux/sched.h: In function 'lock_need_resched':
/usr/include/linux/sched.h:1470: error: 'spinlock_t' has no member named 'break_lock'
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:1523: error: expected ')' before 'pid'
/usr/include/linux/sched.h:1524: error: expected ')' before 'pid'
In file included from /usr/include/linux/kobject.h:22,
from /usr/include/linux/sysdev.h:24,
from /usr/include/linux/sched.h:1526,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/sysfs.h:21: error: expected specifier-qualifier-list before 'mode_t'
/usr/include/linux/sysfs.h:55: error: expected specifier-qualifier-list before 'size_t'
/usr/include/linux/sysfs.h:64: error: expected specifier-qualifier-list before 'ssize_t'
/usr/include/linux/sysfs.h:105: error: expected declaration specifiers or '...' before 'mode_t'
In file included from /usr/include/linux/sysdev.h:24,
from /usr/include/linux/sched.h:1526,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/kobject.h:257: error: expected specifier-qualifier-list before 'ssize_t'
In file included from /usr/include/linux/sched.h:1526,
from /usr/include/linux/module.h:9,
from modtest.c:1:
/usr/include/linux/sysdev.h:42: error: expected specifier-qualifier-list before 'ssize_t'
/usr/include/linux/sysdev.h:96: error: expected specifier-qualifier-list before 'ssize_t'
In file included from /usr/include/linux/module.h:12,
from modtest.c:1:
/usr/include/linux/stat.h:61: error: expected specifier-qualifier-list before 'dev_t'
In file included from modtest.c:1:
/usr/include/linux/module.h:50: error: expected specifier-qualifier-list before 'ssize_t'
/usr/include/linux/module.h:366: error: expected declaration specifiers or '...' before 'size_t'
이런 메세지를 뱉으며 에러가 나는군요-_-; 어떻게 해야 하는건가요 ㅠㅠ
코드는 아래와 같습니다
#include linux/module.h (앞뒤로 꺽쇠 있음-_-)
int init_module() {
printk("Hello,world\n");
return 0;
}
void cleanup_module() {
printk("Good bye\n");
}
음.. 코드를 보니깐
음.. 코드를 보니깐 LDD의 2.4.x에서 사용하던 코드네요. 일단 module init 지점과 cleanup 지점을 module_init, module_exit로 선언해주셔야 하고요. 또한, makefile도 2.4와는 달라졌으니, 검색해보시면 정보가 나오실 겁니다. 그리고, module 프로그래밍의 경우에는 kernel header를 참조하게 됩니다. 즉, 현재 빌드되어서 부팅한 커널의 kernel source 혹은 kernel header들은 있어야 한다는 거지요. 만약 없으시다면, kernel header를 설치하시면 됩니다.
------------------------------------------------------
아직은 젊다. 모든 것을 할 수 있는 나이란 말이지.
------------------------------------------------------
아직은 젊다. 모든 것을 할 수 있는 나이란 말이지.
댓글 달기