# System Call compilation error



## Logan89 (Feb 22, 2013)

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

```
364   STD   BSD {int sys_myhello(char *buf);}
```

2)Run in the same directory

```
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

```
#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


----------



## DutchDaemon (Feb 22, 2013)

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).


----------

