strncpy在Linux编译出错,求助,linux内核编译问题

redhat下编译的linux 0.11

In file included from string.c:14:

../include/string.h:129: warning: conflicting types for built-in function 'strchr'

../include/string.h:146: warning: conflicting types for built-in function 'strrchr'

../include/string.h:396: warning: conflicting types for built-in function 'memset'

../include/string.h:39: warning: 'strncpy' defined but not used

../include/string.h:69: warning: 'strncat' defined but not used

../include/string.h:108: warning: 'strncmp' defined but not used

../include/string.h:129: warning: 'strchr' defined but not used

../include/string.h:146: warning: 'strrchr' defined but not used

../include/string.h:337: warning: 'memcpy' defined but not used

../include/string.h:364: warning: 'memcmp' defined but not used

../include/string.h:396: warning: 'memset' defined but not used

gcc -mcpu=i386 -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -I../include

-c -o malloc.o malloc.c

malloc.c: In function `malloc':

malloc.c:156: warning: use of cast expressions as lvalues is deprecated

ar rcs lib.a ctype.o _exit.o open.o close.o errno.o write.o dup.o setsid.o execve.o wait.o string.o malloc.o

sync

make[1]: Leaving directory `/linux/lib'

ld -m elf_i386 -Ttext 0 -e startup_32 boot/head.o init/main.o

kernel/kernel.o mm/mm.o fs/fs.o

kernel/blk_drv/blk_drv.a kernel/chr_drv/chr_drv.a

kernel/math/math.a

lib/lib.a

-o tools/system

kernel/kernel.o(.text+0x1787): In function `copy_process':

: undefined reference to `memcpy'

make: *** [tools/system] Error 1

这个问题怎么改阿

|

warning可以不用理

主要是因为copy_process中调用了memcpy但是这个文件里没包含相应的头文件

|

有点难度哦

|

该回复于2008-11-05 14:01:33被版主删除

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值