summaryrefslogtreecommitdiff
path: root/x11/gnome2-control-center/patches/patch-ab
blob: 0c10b142d9913dfdde9d9e70cf0fbc3bc29ca17e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-ab,v 1.5 2006/09/24 20:00:14 joerg Exp $

--- capplets/about-me/gnome-about-me.c.orig	2006-09-24 20:42:14.000000000 +0000
+++ capplets/about-me/gnome-about-me.c
@@ -267,16 +267,12 @@ static char *
 get_user_login (void)
 {
 	char buf[LINE_MAX * 4];
-	struct passwd pwd, *err;
+	struct passwd *pwd;
 
-	int i;
-#if __sun
-	i = getpwuid_r (getuid (), &pwd, buf, sizeof (buf));
-	return (i != 0) ? g_strdup (pwd.pw_name) : NULL;
-#else
-	i = getpwuid_r (getuid (), &pwd, buf, sizeof (buf), &err);
-	return ((i == 0) && (err == &pwd)) ? g_strdup (pwd.pw_name) : NULL;
-#endif
+	pwd = getpwuid (getuid ());
+	if (pwd == NULL)
+		return NULL;
+	return g_strdup (pwd->pw_name);
 }
 
 /*