aboutsummaryrefslogtreecommitdiff
path: root/devel/RStudio/files/patch-src_cpp_shared__core_system_User.cpp
blob: dc2aacfdae43e7a9f76c3f7bd703928d59b8db19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
- Workaround for https://github.com/rstudio/rstudio/issues/8908

--- src/cpp/shared_core/system/User.cpp.orig	2021-02-05 21:40:04 UTC
+++ src/cpp/shared_core/system/User.cpp
@@ -64,6 +64,8 @@ struct User::Impl
 
       // Get the maximum size of a passwd for this system.
       long buffSize = ::sysconf(_SC_GETPW_R_SIZE_MAX);
+      if (buffSize == -1)
+      	buffSize = 4096;
       if (buffSize == 1)
          buffSize = 4096; // some systems return -1, be conservative!