Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude unsupported getaddrinfo flags #3930

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions starboard/nplb/posix_compliance/posix_socket_resolve_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ TEST(PosixSocketResolveTest, SunnyDayFamily) {
TEST(PosixSocketResolveTest, SunnyDayFlags) {
struct addrinfo hints = {0};
int flags_to_test[] = {
AI_PASSIVE, AI_ADDRCONFIG, AI_PASSIVE, AI_CANONNAME, AI_V4MAPPED, AI_ALL,
// Non-modular builds use native libc getaddrinfo.
#if defined(SB_MODULAR_BUILD)
// And bionic does not support these flags.
AI_V4MAPPED, AI_NUMERICHOST, AI_NUMERICSERV,
#endif
AI_PASSIVE, AI_CANONNAME, AI_ADDRCONFIG,
};
for (auto flag : flags_to_test) {
hints.ai_flags |= flag;
hints.ai_flags = flag;
hints.ai_socktype = SOCK_STREAM;
struct addrinfo* ai = nullptr;

int result = getaddrinfo(kTestHostName, 0, &hints, &ai);
Expand Down
Loading