0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-11-23 13:46:16 +00:00
termux-packages/x11-packages/fontforge-gtk/gutils-fsys.c.patch
2022-05-18 08:12:59 +09:00

39 lines
636 B
Diff

--- a/gutils/fsys.c
+++ b/gutils/fsys.c
@@ -167,6 +167,9 @@
if ( dir!=NULL )
return( copy(dir) );
+#ifdef __ANDROID__
+return( copy("@TERMUX_HOME@") );
+#else
uid = getuid();
while ( (pw=getpwent())!=NULL ) {
if ( pw->pw_uid==uid ) {
@@ -177,6 +180,7 @@
}
endpwent();
return( NULL );
+#endif /* __ANDROID__ */
#endif
}
@@ -887,6 +891,9 @@
if( home!=NULL )
return home;
+#ifdef __ANDROID__
+return( "@TERMUX_HOME@" );
+#else
uid = getuid();
while( (pw=getpwent())!=NULL ) {
if ( pw->pw_uid==uid ) {
@@ -897,6 +904,7 @@
}
endpwent();
return NULL;
+#endif /* __ANDROID__ */
#endif
}