打印

‘dev_t’ undeclared (first use in this function)

[复制链接]
4093|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
w651134|  楼主 | 2010-8-23 11:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请各位高手帮忙看一下这是什么问题?
这是程序:
#include<stdio.h>
#include<linux/kdev_t.h>
#include<linux/types.h>
#include<linux/fs.h>
void main()
{
int a,b,c,d;
int scull_major,scull_minor;
dev_t s;
//ss=MKDEV(scull_major,scull_minor);
//a=register_chrdev_region(ss,1,"www");
//printf("a=%d\n",a);
}
这是显示的错误:
register.c: In function ‘main’:
register.c:9: error: ‘dev_t’ undeclared (first use in this function)
register.c:9: error: (Each undeclared identifier is reported only once
register.c:9: error: for each function it appears in.)
register.c:9: error: expected ‘;’ before ‘s’
这是头文件#include<linux/types.h>中关于dev_t的定义:
typedef __u32 __kernel_dev_t;
typedef __kernel_fd_set         fd_set;
typedef __kernel_dev_t          dev_t;

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

7

主题

15

帖子

0

粉丝