在编译FreeBSD自定义系统调用时“解除指向不完整类型的指针”

时间:2013-02-09 03:08:48

标签: c compiler-errors

编译此代码时出现编译错误:

#include <sys/param.h> 
#include <sys/system.h>

struct syshello_args 
{
   char *buf;
};

int sys_myhello(p, uap)
struct proc* p; struct syshello_args* uap;
{
   sprintf(uap->buf, "Hello");
   p->p_retval[0]=0;
   return 0;
}

我收到很多错误:

我根本不熟悉C语言。我在几个教程中找到了这个例子但是 它对我不起作用。任何人都可以帮我修复错误。

谢谢

0 个答案:

没有答案