免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1194 | 回复: 0
打印 上一主题 下一主题

HELP!! error when using sigqueue in loadable module [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-30 14:30 |只看该作者 |倒序浏览
I want to use "sigqueue" in the module to send signal to a user process .
(1)if not "#include <signal.h>"
   compilation ok, but when insert module:
[root ]# /sbin/insmod ./syscall.o
./syscall.o: unresolved symbol sigqueue
./syscall.o:
Hint: You are trying to load a module without a GPL compatible license
      and it has unresolved symbols.  Contact the module supplier for
      assistance, only they can help you.

(2)if "#include <signal.h>", compilation error:

[root ]# make
gcc -O2 -DMODULE -D__KERNEL__ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -isystem /lib/modules/`uname -r`/build/include   -c -o syscall.o syscall.c
In file included from syscall.c:21:
/usr/include/signal.h:50: error: conflicting types for `sigset_t'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/signal.h:21: error: previous declaration of `sigset_t'
In file included from /usr/include/signal.h:205,
                 from syscall.c:21:
/usr/include/time.h:119: error: redefinition of `struct timespec'
In file included from /usr/include/signal.h:208,
                 from syscall.c:21:
/usr/include/bits/siginfo.h:34: error: redefinition of `union sigval'
/usr/include/bits/siginfo.h:52: error: redefinition of `struct siginfo'
/usr/include/bits/siginfo.h:65: error: syntax error before '.' token
/usr/include/bits/siginfo.h:66: error: syntax error before '.' token
/usr/include/bits/siginfo.h:80: error: syntax error before '.' token
/usr/include/bits/siginfo.h:81: error: syntax error before '.' token
/usr/include/bits/siginfo.h:83: error: syntax error before '}' token
/usr/include/bits/siginfo.h:88: error: syntax error before '.' token
/usr/include/bits/siginfo.h:89: error: syntax error before '.' token
/usr/include/bits/siginfo.h:90: error: syntax error before '.' token
/usr/include/bits/siginfo.h:91: error: syntax error before '.' token
/usr/include/bits/siginfo.h:92: error: syntax error before '.' token
/usr/include/bits/siginfo.h:98: error: syntax error before '.' token
/usr/include/bits/siginfo.h:104: error: syntax error before '.' token
/usr/include/bits/siginfo.h:105: error: syntax error before '.' token
/usr/include/bits/siginfo.h:107: error: syntax error before '}' token
/usr/include/bits/siginfo.h:108: error: syntax error before '}' token
/usr/include/bits/siginfo.h:133: error: syntax error before '-' token
/usr/include/bits/siginfo.h:155: error: syntax error before '(' token
/usr/include/bits/siginfo.h:176: error: syntax error before '(' token
/usr/include/bits/siginfo.h:197: error: syntax error before '(' token
/usr/include/bits/siginfo.h:206: error: syntax error before '(' token
/usr/include/bits/siginfo.h:217: error: syntax error before '(' token
/usr/include/bits/siginfo.h:226: error: syntax error before '(' token
/usr/include/bits/siginfo.h:243: error: syntax error before '(' token
/usr/include/bits/siginfo.h:274: error: redefinition of `struct sigevent'
/usr/include/bits/siginfo.h:302: error: syntax error before numeric constant
In file included from syscall.c:21:
/usr/include/signal.h:212: error: conflicting types for `sigemptyset'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/signal.h:146: error: previous declaration of `sigemptyset'
/usr/include/signal.h:215: error: conflicting types for `sigfillset'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/signal.h:158: error: previous declaration of `sigfillset'
/usr/include/signal.h:218: error: conflicting types for `sigaddset'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/signal.h:183: error: previous declaration of `sigaddset'
/usr/include/signal.h:221: error: conflicting types for `sigdelset'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/signal.h:188: error: previous declaration of `sigdelset'
/usr/include/signal.h:224: error: syntax error before '?' token
In file included from /usr/include/signal.h:241,
                 from syscall.c:21:
/usr/include/bits/sigaction.h:26: error: redefinition of `struct sigaction'
In file included from /usr/include/signal.h:341,
                 from syscall.c:21:
/usr/include/bits/sigstack.h:36: error: syntax error before numeric constant
/usr/include/bits/sigstack.h:51: error: redefinition of `struct sigaltstack'
syscall.c:42: warning: initialization makes pointer from integer without a cast
syscall.c:52: warning: no previous prototype for `my_clone_call'
syscall.c: In function `my_clone_call':
syscall.c:66: warning: implicit declaration of function `printk_R1b7d4074'
syscall.c:69: error: incompatible type for argument 3 of `sigqueue'
syscall.c: At top level:
syscall.c:78: warning: function declaration isn't a prototype
syscall.c: In function `my_init_intercept_module':
syscall.c:87: warning: assignment makes pointer from integer without a cast
syscall.c:88: warning: assignment makes integer from pointer without a cast
syscall.c:79: warning: unused variable `i'
syscall.c:81: warning: statement with no effect
syscall.c: At top level:
syscall.c:95: warning: function declaration isn't a prototype
syscall.c: In function `my_cleanup_intercept_module':
syscall.c:96: warning: assignment makes integer from pointer without a cast
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/processor.h: In function `copy_segments':
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/processor.h:453: warning: unused parameter `p'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/processor.h:453: warning: unused parameter `mm'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/processor.h: In function `release_segments':
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/processor.h:454: warning: unused parameter `mm'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/prefetch.h: In function `prefetch':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/prefetch.h:43: warning: unused parameter `x'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/prefetch.h: In function `prefetchw':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/prefetch.h:48: warning: unused parameter `x'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/wait.h: In function `__remove_wait_queue':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/wait.h:227: warning: unused parameter `head'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/smp.h: In function `smp_send_reschedule':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/smp.h:113: warning: unused parameter `cpu'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h: In function `task_cpu':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h:640: warning: unused parameter `p'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h: In function `set_task_cpu':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h:645: warning: unused parameter `p'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h:645: warning: unused parameter `cpu'
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h: In function `task_unlock':
/lib/modules/2.4.22-1.2199.nptl/build/include/linux/sched.h:1097: warning: unused parameter `p'
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/uaccess.h: In function `verify_area':
/lib/modules/2.4.22-1.2199.nptl/build/include/asm/uaccess.h:104: warning: unused parameter `type'
make: *** [syscall.o] Error 1


Please help me .
Thanks!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP