Support compiling python2 against musl

Bug: 190084016
Test: m out/soong/host/linux-x86/bin/py2-run with musl
Change-Id: Idf35d26fe79e69fcaee4b9981fef7aae9b1c7f60
diff --git a/linux_x86_64/pyconfig/pyconfig.h b/linux_x86_64/pyconfig/pyconfig.h
index 210484d..e6c363d 100644
--- a/linux_x86_64/pyconfig/pyconfig.h
+++ b/linux_x86_64/pyconfig/pyconfig.h
@@ -858,7 +858,10 @@
 #define HAVE_TMPNAM 1
 
 /* Define to 1 if you have the `tmpnam_r' function. */
+#ifdef __GLIBC__
+// musl does not have tmpnam_r
 #define HAVE_TMPNAM_R 1
+#endif
 
 /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
    `HAVE_STRUCT_TM_TM_ZONE' instead. */