You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NDK's sys/socket.h defines SOCK_CLOEXEC and SOCK_NONBLOCK unconditionally but it can only be used by accept4 syscall which is guarded by ANDROID_API >= 21.
Some application may check if SOCK_CLOEXEC and SOCK_NONBLOCK are defined to decide if they can use accept4 or if they should fallback to accept. If SOCK_CLOEXEC and SOCK_NONBLOCK are defined but not accept4, you get an error when compiling for API level < 21.
Possible solution:
Adding a guard ANDROID_API >= 21 for the defines SOCK_CLOEXEC and SOCK_NONBLOCK will prevents such error.
Environment Details
NDK Version: 21.3.6528147
Build system: any (not related to build system)
Host OS: any (not related to host OS)
ABI: Android 19
NDK API level: 19
Device API level: 19
The text was updated successfully, but these errors were encountered:
Description
NDK's sys/socket.h defines SOCK_CLOEXEC and SOCK_NONBLOCK unconditionally but it can only be used by accept4 syscall which is guarded by ANDROID_API >= 21.
Some application may check if SOCK_CLOEXEC and SOCK_NONBLOCK are defined to decide if they can use accept4 or if they should fallback to accept. If SOCK_CLOEXEC and SOCK_NONBLOCK are defined but not accept4, you get an error when compiling for API level < 21.
Possible solution:
Adding a guard ANDROID_API >= 21 for the defines SOCK_CLOEXEC and SOCK_NONBLOCK will prevents such error.
Environment Details
The text was updated successfully, but these errors were encountered: