https://github.com/brad0 created 
https://github.com/llvm/llvm-project/pull/124182

None

>From 394b06124cc49dfca54071ef6f19ec55914c0750 Mon Sep 17 00:00:00 2001
From: Brad Smith <b...@comstyle.com>
Date: Thu, 23 Jan 2025 15:15:50 -0500
Subject: [PATCH] [lldb] Check Android API for existence of getgrgid_r()
 introduced in 24

---
 lldb/source/Host/posix/HostInfoPosix.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to