I am trying to add a new system call at: /usr/src/servers/pm/exec.c
I write a very simple method in exec.c
:
void parseBlack(char * value){
char * ptr = strtok(values, ";");
}
However, when I try to compile it there is an error:
In function parseBlac, undefined reference to "strtok".
And I have added #include <string.h>
It is weird. I checked minix api. It has this method:
/minix/include/string.h(http://code.metager.de/source/xref/minix/include/string.h)
Here is a screen shot:
Servers in MINIX do not link with the full, bloated and verbose
libc.a
, rather with a limited version of the C library (probablylibminc
in your case). Clearlystrtok
was not considered to be part of that limited library in the release you are using. Either movestrtok.c
to that library (editlibminc/Makefile
then clean and rebuild), or link explicitly withstrtok.o
.