Fix the tests that do not compile on windows
Note that those fixes only focus on the system calls that are not present on both os. Some of the tests still cannot be built after this MR, but the remaining issues are with linking.
Note that those fixes only focus on the system calls that are not present on both os. Some of the tests still cannot be built after this MR, but the remaining issues are with linking.