diff src/os/bsd/vm/attachListener_bsd.cpp @ 6918:0af5da0c9d9d

8001619: Remove usage of _ALLBSD_SOURCE in bsd files Reviewed-by: coleenp, dholmes
author sla
date Mon, 29 Oct 2012 21:04:17 +0100
parents 77591ef8983a
children e95fc50106cf
line wrap: on
line diff
--- a/src/os/bsd/vm/attachListener_bsd.cpp	Thu Oct 25 16:33:40 2012 -0400
+++ b/src/os/bsd/vm/attachListener_bsd.cpp	Mon Oct 29 21:04:17 2012 +0100
@@ -342,7 +342,6 @@
 
     // get the credentials of the peer and check the effective uid/guid
     // - check with jeff on this.
-#ifdef _ALLBSD_SOURCE
     uid_t puid;
     gid_t pgid;
     if (::getpeereid(s, &puid, &pgid) != 0) {
@@ -350,17 +349,6 @@
       RESTARTABLE(::close(s), res);
       continue;
     }
-#else
-    struct ucred cred_info;
-    socklen_t optlen = sizeof(cred_info);
-    if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
-      int res;
-      RESTARTABLE(::close(s), res);
-      continue;
-    }
-    uid_t puid = cred_info.uid;
-    gid_t pgid = cred_info.gid;
-#endif
     uid_t euid = geteuid();
     gid_t egid = getegid();