Index: libraries/python/nacl.patch |
diff --git a/libraries/python/nacl.patch b/libraries/python/nacl.patch |
index a8e930f63acdd75b0a40deb2aa187c3e51dae15e..b35cf64baa97d1c967f50da363a7fc605204ddfe 100644 |
--- a/libraries/python/nacl.patch |
+++ b/libraries/python/nacl.patch |
@@ -37,6 +37,35 @@ index 9d55550..09e7a69 100644 |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt |
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c |
+index 65ade9f..3aaf148 100644 |
+--- a/Modules/posixmodule.c |
++++ b/Modules/posixmodule.c |
+@@ -216,6 +216,24 @@ extern int lstat(const char *, struct stat *); |
+ |
+ #endif /* !_MSC_VER */ |
+ |
++#if defined(__native_client__) && !defined(__GLIBC__) |
++// NaCl's newlib headers don't declare these functions |
++extern int ftruncate(int fd, off_t length); |
++extern int lstat(const char *, struct stat *); |
Mark Seaborn
2013/07/12 19:47:29
This is fixed in https://src.chromium.org/viewvc/n
Sam Clegg
2013/07/12 21:54:29
Added TODO to remove when this lands.
Mark Seaborn
2013/07/16 15:40:12
The change to fix this should have rolled into Chr
Sam Clegg
2013/07/16 16:19:16
This is still missing in the lastest SDK built aga
|
++ |
++// These functions are missing from NaCl's newlib |
++// and nosys libraries. |
++int fsync(int fd) { |
Mark Seaborn
2013/07/12 19:47:29
This is fixed in https://src.chromium.org/viewvc/n
Sam Clegg
2013/07/12 21:54:29
Added TODO to remove when this lands.
|
++ errno = ENOSYS; |
++ return -1; |
++} |
++ |
++int fdatasync(int fd) { |
++ errno = ENOSYS; |
++ return -1; |
++} |
++#endif |
++ |
+ #ifdef HAVE_UTIME_H |
+ #include <utime.h> |
+ #endif /* HAVE_UTIME_H */ |
diff --git a/Modules/pwdmodule.c b/Modules/pwdmodule.c |
index c2907f6..9e64898 100644 |
--- a/Modules/pwdmodule.c |
@@ -89,6 +118,21 @@ index 2739b8b..35f0aa0 100644 |
+#endif |
return Py_Main(argc, argv); |
} |
+diff --git a/Python/thread.c b/Python/thread.c |
+index dd333e8..ac05657 100644 |
+--- a/Python/thread.c |
++++ b/Python/thread.c |
+@@ -17,6 +17,10 @@ |
+ # endif |
+ #endif |
+ |
++#if defined __native_client__ && !defined __GLIBC__ |
Mark Seaborn
2013/07/12 19:47:29
Can you link to https://code.google.com/p/nativecl
Sam Clegg
2013/07/12 21:54:29
Done.
|
++#define _POSIX_THREADS |
++#endif |
++ |
+ #ifndef DONT_HAVE_STDIO_H |
+ #include <stdio.h> |
+ #endif |
diff --git a/configure b/configure |
index dc0dfd0..d45f7b0 100755 |
--- a/configure |