Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1015)

Unified Diff: ports/gnutls/nacl.patch

Issue 1892223002: New port: gnutls (Closed) Base URL: https://chromium.googlesource.com/webports.git@nettle
Patch Set: simplify nacl.patch Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/gnutls/build.sh ('k') | ports/gnutls/pkg_info » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/gnutls/nacl.patch
diff --git a/ports/gnutls/nacl.patch b/ports/gnutls/nacl.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e8b5f1fefa45ac596e6c466041fa0bc795d59291
--- /dev/null
+++ b/ports/gnutls/nacl.patch
@@ -0,0 +1,34 @@
+diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
+index 9bda352..8756daf 100644
+--- a/lib/gnutls_global.c
++++ b/lib/gnutls_global.c
+@@ -54,7 +54,15 @@
+ int __attribute__((weak)) _gnutls_global_init_skip(void);
+ int _gnutls_global_init_skip(void)
+ {
++#ifdef __native_client__
++ /* _gnutls_rnd_init() will fail if nacl_io_init() or
++ * nacl_io_init_ppapi() has not run yet. Only the app can invoke
++ * the latter function (and only one can be called).
++ */
++ return 1;
++#else
+ return 0;
++#endif
+ }
+
+ /* created by asn1c */
+diff --git a/lib/x509/verify-high2.c b/lib/x509/verify-high2.c
+index 558fa89..902f55c 100644
+--- a/lib/x509/verify-high2.c
++++ b/lib/x509/verify-high2.c
+@@ -37,8 +37,8 @@
+
+ #include <dirent.h>
+
+-#ifndef _DIRENT_HAVE_D_TYPE
++#if !defined(_DIRENT_HAVE_D_TYPE) && !defined(__native_client__)
+ # ifdef DT_UNKNOWN
+ # define _DIRENT_HAVE_D_TYPE
+ # endif
+ #endif
« no previous file with comments | « ports/gnutls/build.sh ('k') | ports/gnutls/pkg_info » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698