mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:28:11 +00:00
LibCore: Add support for compiling for Android with API Version >= 30
Most changes are around user and group management, which are exposed in the Android NDK differently than other Unices. We require version 30 for memfd_create, version 28 for posix_spawn, and so on. It's possible a shim for memfd_create could be used, but since Google is mandating new apps use API level 30 as of Nov 2022, this seems suitable.
This commit is contained in:
parent
3b15addbc8
commit
d84fc60f96
5 changed files with 16 additions and 10 deletions
|
@ -26,7 +26,7 @@
|
|||
#include <time.h>
|
||||
#include <utime.h>
|
||||
|
||||
#ifndef AK_OS_BSD_GENERIC
|
||||
#if !defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_ANDROID)
|
||||
# include <shadow.h>
|
||||
#endif
|
||||
|
||||
|
@ -78,7 +78,7 @@ ALWAYS_INLINE ErrorOr<void> unveil(std::nullptr_t, std::nullptr_t)
|
|||
return unveil(StringView {}, StringView {});
|
||||
}
|
||||
|
||||
#ifndef AK_OS_BSD_GENERIC
|
||||
#if !defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_ANDROID)
|
||||
ErrorOr<Optional<struct spwd>> getspent();
|
||||
ErrorOr<Optional<struct spwd>> getspnam(StringView name);
|
||||
#endif
|
||||
|
@ -157,7 +157,9 @@ ErrorOr<void> unlink(StringView path);
|
|||
ErrorOr<void> utime(StringView path, Optional<struct utimbuf>);
|
||||
ErrorOr<struct utsname> uname();
|
||||
ErrorOr<Array<int, 2>> pipe2(int flags);
|
||||
#ifndef AK_OS_ANDROID
|
||||
ErrorOr<void> adjtime(const struct timeval* delta, struct timeval* old_delta);
|
||||
#endif
|
||||
enum class SearchInPath {
|
||||
No,
|
||||
Yes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue