Skip to content

[lldb] Check Android API for existence of getgrgid_r() introduced in 24 #124182

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

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Jan 23, 2025

No description provided.

@brad0 brad0 requested a review from JDevlieghere as a code owner January 23, 2025 20:20
@llvmbot llvmbot added the lldb label Jan 23, 2025
@brad0 brad0 requested review from labath and enh-google January 23, 2025 20:20
@llvmbot
Copy link
Member

llvmbot commented Jan 23, 2025

@llvm/pr-subscribers-lldb

Author: Brad Smith (brad0)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/124182.diff

1 Files Affected:

  • (modified) lldb/source/Host/posix/HostInfoPosix.cpp (+1-1)
diff --git a/lldb/source/Host/posix/HostInfoPosix.cpp b/lldb/source/Host/posix/HostInfoPosix.cpp
index 23ba3177de317a..879dccfd353be5 100644
--- a/lldb/source/Host/posix/HostInfoPosix.cpp
+++ b/lldb/source/Host/posix/HostInfoPosix.cpp
@@ -119,7 +119,7 @@ std::optional<std::string> PosixUserIDResolver::DoGetUserName(id_t uid) {
 }
 
 std::optional<std::string> PosixUserIDResolver::DoGetGroupName(id_t gid) {
-#ifndef __ANDROID__
+#if !defined(__ANDROID__) || __ANDROID_API__ >= 24
   char group_buffer[PATH_MAX];
   size_t group_buffer_size = sizeof(group_buffer);
   struct group group_info;

@brad0 brad0 merged commit a6cfde6 into llvm:main Jan 24, 2025
9 checks passed
@brad0 brad0 deleted the lldb_android branch January 24, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants