cramfs-1.1/mkcramfs.c:446: undefined reference to `minor'

在编译cramfs-1.1时报如下错误:

/usr/bin/ld: /tmp/ccMb5KDC.o: in function `print_node':
/root/cramfs-1.1/mkcramfs.c:446: undefined reference to `minor'
/usr/bin/ld: /root/cramfs-1.1/mkcramfs.c:446: undefined reference to `major'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: mkcramfs] Error 1

解决办法:

在mkcramfs.c里包含如下头文件:

#include <sys/sysmacros.h>

 

posted @ 2023-04-04 18:12  闹闹爸爸  阅读(176)  评论(0编辑  收藏  举报