]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/log/src/posix/object_name.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / log / src / posix / object_name.cpp
index 0dfd7d4c59576b09dd6859130bb49d8704cbfdde..d0238341a037aa1123f50bff213ebd029c2aa884 100644 (file)
 #include <sys/types.h>
 #if defined(__ANDROID__) && (__ANDROID_API__+0) < 21
 #include <sys/syscall.h>
-#if !defined(__CRYSTAX__)
-// Until Android API version 21 Google NDK does not provide getpwuid_r
-#define BOOST_LOG_NO_GETPWUID_R
-#endif
 #endif
 #if !defined(BOOST_LOG_NO_GETPWUID_R)
 #include <pwd.h>
@@ -79,14 +75,22 @@ std::string get_scope_prefix(object_name::scope ns)
     case object_name::process_group:
         {
             prefix.append("pgid.");
+#if !defined(BOOST_LOG_NO_GETPGRP)
             format_id(getpgrp(), prefix);
+#else
+            format_id(getuid(), prefix);
+#endif
         }
         break;
 
     case object_name::session:
         {
             prefix.append("sid.");
+#if !defined(BOOST_LOG_NO_GETSID)
             format_id(getsid(0), prefix);
+#else
+            format_id(getuid(), prefix);
+#endif
         }
         break;