I already posted this question on Stack overflow, but no luck there: http://stackoverflow.com/questions/14784525/dereferencing-pointer-to-incomplete-type-in-compiling-freebsd-custom-system-caF
I am getting compilation error when I compile this code:
#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;
}
I am getting many errors:
I am not familiar with C language at all. I found this example in a couple of tutorials but it doesn't work for me. Can anyone help me fixing the error.
Thank you
struct procisn't defined. You are probably missing an#includeline (or, as @Mat hints, you are following an ancient tutorial on a new system, where things are done differently). – vonbrand Feb 9 at 15:37