android: Avoid referencing POSIX shared memory functions (#12341)

Stop trying to use POSIX shared memory functions such as `shm_open` on
Android as it's unsupported and the platform libc does not have those
symbols.

This avoids an error such as the below when trying to use
`libghostty-vt` on Android:

> dlopen failed: cannot locate symbol "shm_open" referenced by [..]
pull/12344/head
Mitchell Hashimoto 2026-04-19 15:21:26 -07:00 committed by GitHub
commit dcc39dcd40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -159,8 +159,9 @@ pub const LoadingImage = struct {
t: command.Transmission,
path: []const u8,
) !void {
// android does not support POSIX shared memory.
// windows is currently unsupported, does it support shm?
if (comptime builtin.target.os.tag == .windows) {
if (comptime builtin.abi.isAndroid() or builtin.target.os.tag == .windows) {
return error.UnsupportedMedium;
}