I'm implementing a native expo-module using WireGuard and got the same error.
Adding the #include <sys/types.h>
line fixed this error, but I got multiple errors in .h files in the DoubleConversion Pod: Unknown type name 'namespace'
Does somebody have the same problem? How did you fix it?