the sys directory is a unix/linux system header directory with a lots of system commands. Different brands/version linux may put it in different places. The following command can help you:
find /usr/include -type d -name sys
On my ubuntu 16 got the two
The first one is home to BSD unix system headers.
The second one is a directory containing Linux 64 bits system heads.
I run into problems with cmake not being able to find the sys/stat.h file.
My temporary solution is to make a symbolic link
/user/local/include/sys/stat.h from /usr/include/x86_64-linux-gnu/sys/stat.h
I don't want to pollute the /usr/include directory, and I am only making a link to one particular header file and not the whole sys directory. I think this is a defect of cmake, so making minimal impact by making only one link. Hope this may help those who are suffering from the same problem.