Fix pid_t redefinition error

(cherry picked from commit 2280e584a0e41d40dfe1adf93d6967f9a020e6a4)