pkgsrc/x11/gnome-control-center/patches/patch-ab
drochner 8cd065a7fc update to 2.24.0.1
This switches to the gnome-2.24 release branch.
2008-10-16 15:24:01 +00:00

27 lines
787 B
Text

$NetBSD: patch-ab,v 1.2 2008/10/16 15:24:01 drochner Exp $
--- capplets/about-me/gnome-about-me.c.orig 2008-09-24 18:36:23.000000000 +0200
+++ capplets/about-me/gnome-about-me.c
@@ -329,17 +329,12 @@ about_me_focus_out (GtkWidget *widget, G
static char *
get_user_login (void)
{
- char buf[LINE_MAX * 4];
- struct passwd pwd, *err;
+ struct passwd *pwd;
- int i;
-#if defined(__sun) && !defined(_POSIX_PTHREAD_SEMANTICS)
- 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);
}
/*