chiark
/
gitweb
/
~mdw
/
termux-packages
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
03e92e9
)
ndk_patches: Replace endpwent() with empty stub
author
Fredrik Fornwall
<fredrik@fornwall.net>
Thu, 10 Mar 2016 20:24:52 +0000
(15:24 -0500)
committer
Fredrik Fornwall
<fredrik@fornwall.net>
Thu, 10 Mar 2016 20:24:52 +0000
(15:24 -0500)
ndk_patches/pwd.patch
patch
|
blob
|
blame
|
history
diff --git
a/ndk_patches/pwd.patch
b/ndk_patches/pwd.patch
index b302e8f8f4837c370c5a3d4228376dde3073bc04..c35e60cc434d131622077cd7860994afb48b4cf3 100644
(file)
--- a/
ndk_patches/pwd.patch
+++ b/
ndk_patches/pwd.patch
@@
-1,6
+1,6
@@
diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/pwd.h ./usr/include/pwd.h
diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/pwd.h ./usr/include/pwd.h
---- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/pwd.h 201
4-10-14 22:53:49.000000000 -04
00
-+++ ./usr/include/pwd.h 201
5-07-15 09:42:32.974621965 -04
00
+--- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/pwd.h 201
6-03-03 16:54:24.000000000 -05
00
++++ ./usr/include/pwd.h 201
6-03-10 08:11:16.795710172 -05
00
@@ -65,6 +65,10 @@
#include <sys/cdefs.h>
#include <sys/types.h>
@@ -65,6 +65,10 @@
#include <sys/cdefs.h>
#include <sys/types.h>
@@
-12,10
+12,11
@@
diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_MASTERPASSWD "/etc/master.passwd"
#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
#define _PATH_PASSWD "/etc/passwd"
#define _PATH_MASTERPASSWD "/etc/master.passwd"
#define _PATH_MASTERPASSWD_LOCK "/etc/ptmp"
-@@ -119,
6 +122,36
@@
+@@ -119,
7 +123,37
@@
int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
+-void endpwent(void);
+static void android_setup_pwd(struct passwd* pw) {
+ static char realpath_buffer[4096/*PATH_MAX*/];
+ char* result = realpath("@TERMUX_HOME@/.termux/shell", realpath_buffer);
+static void android_setup_pwd(struct passwd* pw) {
+ static char realpath_buffer[4096/*PATH_MAX*/];
+ char* result = realpath("@TERMUX_HOME@/.termux/shell", realpath_buffer);
@@
-46,6
+47,6
@@
diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
+
+#define getpwnam android_polyfill_getpwnam
+#define getpwuid android_polyfill_getpwuid
+
+#define getpwnam android_polyfill_getpwnam
+#define getpwuid android_polyfill_getpwuid
- void endpwent(void);
++static void endpwent(void) { /* Do nothing. */ }
struct passwd* getpwent(void);
int setpwent(void);
struct passwd* getpwent(void);
int setpwent(void);