1 2 3 4 5 6
#ifdef _WIN32 #include <process.h> #define getpid _getpid #else #include <unistd.h> #endif