Syscall - sys/syscall.h - Not such file or directory -

10,198

Windows does not have a <sys/syscall.h>. If you are trying to port something from Linux to Windows that uses this, then you need something along the lines of:

#if __linux
#include <sys/syscall.h>
#elif defined(_WIN32) || defined(_WIN64)
#include <windows.h>       // Or something like it. 
#endif

Of course, most likely your code also won't compile with these changes alone, you will also have to fix up the code that actually uses the declarations in <sys/syscall.h>, which will highly depend on exactly what that is.

If you are not quite familiar with porting code and the project is large, I'd check if someone else has made a windows port of the project, because chances are that you will struggle. There are lots of things in a Unix/Linux environment that is quite different from how Windows works.

Share:
10,198
user3254491
Author by

user3254491

Updated on June 04, 2022

Comments

  • user3254491
    user3254491 almost 2 years

    Where can i find this library? The compiler reports me: "Not such file or directory"... I want to call the syscall function included in this library...