diff options
-rw-r--r-- | lldb/include/lldb/Host/posix/HostInfoPosix.h | 4 | ||||
-rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 1 | ||||
-rw-r--r-- | lldb/source/Host/posix/HostInfoPosix.cpp | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/lldb/include/lldb/Host/posix/HostInfoPosix.h b/lldb/include/lldb/Host/posix/HostInfoPosix.h index 6c6f676e322..2a39344d5f8 100644 --- a/lldb/include/lldb/Host/posix/HostInfoPosix.h +++ b/lldb/include/lldb/Host/posix/HostInfoPosix.h @@ -22,8 +22,8 @@ class HostInfoPosix : public HostInfoBase public: static size_t GetPageSize(); static bool GetHostname(std::string &s); - static bool LookupUserName(uint32_t uid, std::string &user_name); - static bool LookupGroupName(uint32_t gid, std::string &group_name); + static const char *LookupUserName(uint32_t uid, std::string &user_name); + static const char *LookupGroupName(uint32_t gid, std::string &group_name); protected: static bool ComputeSupportExeDirectory(FileSpec &file_spec); diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 28980831023..73a0fd5bf99 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -10,6 +10,7 @@ #include "lldb/Core/Log.h" #include "lldb/Host/linux/HostInfoLinux.h" +#include <limits.h> #include <stdio.h> #include <string.h> #include <sys/utsname.h> diff --git a/lldb/source/Host/posix/HostInfoPosix.cpp b/lldb/source/Host/posix/HostInfoPosix.cpp index c80313787fa..bb95a0d26c9 100644 --- a/lldb/source/Host/posix/HostInfoPosix.cpp +++ b/lldb/source/Host/posix/HostInfoPosix.cpp @@ -47,7 +47,7 @@ HostInfoPosix::GetHostname(std::string &s) return false; } -bool +const char * HostInfoPosix::LookupUserName(uint32_t uid, std::string &user_name) { struct passwd user_info; @@ -66,7 +66,7 @@ HostInfoPosix::LookupUserName(uint32_t uid, std::string &user_name) return NULL; } -bool +const char * HostInfoPosix::LookupGroupName(uint32_t gid, std::string &group_name) { char group_buffer[PATH_MAX]; |