Support building with PNaCl.

PNaCl needs OPENSSL_NO_ASM to work and a couple of cases were missing
because it hasn't previously been tested.

Additionally, it defined _BSD_SOURCE and others on the command line,
causing duplicate definition errors when defined in source code.

It's missing readdir_r.

It uses newlib, which appears to use u_short in socket.h without ever
defining it.

Change-Id: Ieccfc7365723d0521f6327eebe9f44a2afc57406
Reviewed-on: https://boringssl-review.googlesource.com/1140
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/bio/printf.c b/crypto/bio/printf.c
index e513ff3..7f7106f 100644
--- a/crypto/bio/printf.c
+++ b/crypto/bio/printf.c
@@ -54,7 +54,9 @@
  * copied and put under another distribution licence
  * [including the GNU Public Licence.] */
 
+#if !defined(_BSD_SOURCE)
 #define _BSD_SOURCE  /* for snprintf, vprintf etc */
+#endif
 
 #include <openssl/bio.h>