Skip to content

Commit 75bd0ae

Browse files
committed
[Android] Build fix after 322333@main: bionic has no shm_open()
https://bugs.webkit.org/show_bug.cgi?id=327849 Reviewed by Adrian Perez de Castro. 322333@main added posixShmOpen() and posixShmUnlink() for every OS(UNIX) platform except PlayStation. Bionic does not provide POSIX shared memory objects, shm_open() and shm_unlink() are not declared in the NDK headers, so WTF fails to build on Android. Nothing on Android calls the functions. * Source/WTF/wtf/posix/POSIXExtras.h: Canonical link: https://commits.webkit.org/324040@main
1 parent e1c510b commit 75bd0ae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎Source/WTF/wtf/posix/POSIXExtras.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ inline int posixStatx(int directoryFileDescriptor, UTF8CStringView path, int fla
136136
{
137137
return dlopen(path.utf8(), mode);
138138
}
139+
#endif
139140

141+
// Bionic has no POSIX shared memory objects.
142+
#if !PLATFORM(PLAYSTATION) && !OS(ANDROID)
140143
[[nodiscard]] inline int posixShmOpen(UTF8CStringView name, int flags, mode_t mode)
141144
{
142145
return shm_open(name.utf8(), flags, mode);
@@ -175,6 +178,8 @@ using WTF::posixStatx;
175178
#endif
176179
#if !PLATFORM(PLAYSTATION)
177180
using WTF::posixDlopen;
181+
#endif
182+
#if !PLATFORM(PLAYSTATION) && !OS(ANDROID)
178183
using WTF::posixShmOpen;
179184
using WTF::posixShmUnlink;
180185
#endif

0 commit comments

Comments
 (0)