Upgrade to current NetBSD popen/pclose.

This gets us back to using vfork now our ARM vfork assembler stub is
fixed, and adds the missing thread safety for the 'pidlist'.

Bug: 5335385
Change-Id: Ib08bfa65b2cb9fa695717aae629ea14816bf988d
diff --git a/libc/upstream-netbsd/netbsd-compat.h b/libc/upstream-netbsd/netbsd-compat.h
index 3833c1d..e33885e 100644
--- a/libc/upstream-netbsd/netbsd-compat.h
+++ b/libc/upstream-netbsd/netbsd-compat.h
@@ -24,4 +24,13 @@
 // TODO: update our <sys/cdefs.h> to support this properly.
 #define __type_fit(t, a) (0 == 0)
 
+// TODO: our 2.6 emulator kernels don't support SOCK_CLOEXEC yet, so we have to do without.
+#define SOCK_CLOEXEC 0
+
+#define _GNU_SOURCE
+
+// TODO: we don't yet have thread-safe environment variables.
+#define __readlockenv() 0
+#define __unlockenv() 0
+
 #endif