System Call compilation error

Status
Not open for further replies.
Hello everyone,

I trying to add a system call in FreeBSD 4.2 and I stuck t one point.
I would appreciate any help

My steps:
1)Add to /sys/kern/syscalls.master the line
Code:
364   STD   BSD {int sys_myhello(char *buf);}

2)Run in the same directory
Code:
sh makesyscalls.sh syscalls.master

3) Copy files syscall.h, syscall-hide.h and sysproto.h from /sys/sys to
/usr/include/sys/

4) create a file sys_myhello.c in /sys/kern/ the following code
Code:
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>

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

5) edit /sys/conf/files and add sys_myhello.c to it
6) Compile the kernel and get error

I tried to compile separately the file /sys/kern/sys_myhello.c and get a compilation error. See the attached screenshots.

I really stuck and now don't have any idea where to go from here
 

Attachments

  • screenshot.JPG
    screenshot.JPG
    45.6 KB · Views: 244
FreeBSD 4.2? We don't process topics about FreeBSD versions that are end-of-life, and certainly not ones that are this antiquated (EOL 2006).
 
Status
Not open for further replies.
Back
Top