Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2014-07-11 04:07:14 +0400
committerAdam Langley <agl@google.com>2014-07-11 23:04:04 +0400
commit0113a4fb60c3b6e9e93a217d5b4d373eb343a8c6 (patch)
tree249fa04520e982bfe7c62b9342070a366288e2cc /crypto/bio
parent925fee36e1f6dcad56e60fccca5fa069e09979f7 (diff)
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>
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/internal.h5
-rw-r--r--crypto/bio/printf.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/crypto/bio/internal.h b/crypto/bio/internal.h
index d4987084..2eb28754 100644
--- a/crypto/bio/internal.h
+++ b/crypto/bio/internal.h
@@ -60,6 +60,11 @@
#include <openssl/base.h>
#if !defined(OPENSSL_WINDOWS)
+#if defined(OPENSSL_PNACL)
+/* newlib uses u_short in socket.h without defining it. */
+typedef unsigned short u_short;
+#endif
+#include <sys/types.h>
#include <sys/socket.h>
#else
#include <WinSock2.h>
diff --git a/crypto/bio/printf.c b/crypto/bio/printf.c
index e513ff3a..7f7106f4 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>