[gnome-keyring/gnome-3-0] egg: adapt SO_PEERCRED usage for OpenBSD



commit 7cefac2b4edd88b87b741d7930959757d1d00c77
Author: Antoine Jacoutot <ajacoutot openbsd org>
Date:   Tue May 24 09:58:02 2011 +0200

    egg: adapt SO_PEERCRED usage for OpenBSD
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650886

 egg/egg-unix-credentials.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/egg/egg-unix-credentials.c b/egg/egg-unix-credentials.c
index 2af0c1b..7024a41 100644
--- a/egg/egg-unix-credentials.c
+++ b/egg/egg-unix-credentials.c
@@ -107,7 +107,11 @@ egg_unix_credentials_read (int sock, pid_t *pid, uid_t *uid)
 
 	{
 #ifdef SO_PEERCRED
+#ifndef __OpenBSD__
 		struct ucred cr;   
+#else
+		struct sockpeercred cr;
+#endif
 		socklen_t cr_len = sizeof (cr);
 		
 		if (getsockopt (sock, SOL_SOCKET, SO_PEERCRED, &cr, &cr_len) == 0 &&



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]