Try using #ifdef to check for the OS type and include the appropriate header file.Also, do the same thing where the function name differs. I hope the idea is clear to you.