pkgsrc/sysutils/gnome-system-tools/patches/patch-aa
2009-07-17 18:43:15 +00:00

31 lines
695 B
Text

$NetBSD: patch-aa,v 1.2 2009/07/17 18:43:15 hasso Exp $
--- src/users/user-settings.c.orig 2009-03-17 17:21:01 +0200
+++ src/users/user-settings.c 2009-07-17 21:13:38 +0300
@@ -29,7 +29,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
+#ifndef __NetBSD__
#include <utmp.h>
+#define UTMP utmp
+#else
+#include <utmpx.h>
+#define UTMP utmpx
+#endif
#include <ctype.h>
#include "users-table.h"
@@ -278,10 +284,10 @@ static void
set_login_length (GtkWidget *entry)
{
gint max_len;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
max_len = UT_NAMESIZE;
#else
- struct utmp ut;
+ struct UTMP ut;
max_len = sizeof (ut.ut_user);
#endif