summaryrefslogtreecommitdiff
path: root/x11/gnome2-control-center/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'x11/gnome2-control-center/patches/patch-ab')
-rw-r--r--x11/gnome2-control-center/patches/patch-ab26
1 files changed, 26 insertions, 0 deletions
diff --git a/x11/gnome2-control-center/patches/patch-ab b/x11/gnome2-control-center/patches/patch-ab
new file mode 100644
index 00000000000..0c10b142d99
--- /dev/null
+++ b/x11/gnome2-control-center/patches/patch-ab
@@ -0,0 +1,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);
+ }
+
+ /*