From 5420f09b09a0baaaaa89e168dbd2dfc88723b03c Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Mon, 19 Nov 2007 21:52:51 +0000 Subject: Fix build on FreeBSD. Patch from: Joe Marcus Clarke 2007-11-19 William Jon McCann * common/gdm-common-unknown-origin.h: * configure.ac: * daemon/Makefile.am: * daemon/gdm-greeter-session.c: * daemon/gdm-server.c: (gdm_server_class_init): * daemon/gdm-session-record.c: (record_set_username), (gdm_session_record_login), (gdm_session_record_logout): * daemon/gdm-session-worker-job.c: (gdm_session_worker_job_class_init): * daemon/gdm-slave-proxy.c: (spawn_slave): * daemon/main.c: * gui/settings-daemon/plugins/xsettings/gdm-xsettings-manager.c: * gui/simple-chooser/gdm-host-chooser-widget.c: (do_ping): Fix build on FreeBSD. Patch from: Joe Marcus Clarke svn path=/trunk/; revision=5515 --- daemon/Makefile.am | 1 + daemon/gdm-greeter-session.c | 1 + daemon/gdm-server.c | 1 + daemon/gdm-session-record.c | 8 +++++--- daemon/gdm-session-worker-job.c | 1 + daemon/gdm-slave-proxy.c | 1 + daemon/main.c | 3 ++- 7 files changed, 12 insertions(+), 4 deletions(-) (limited to 'daemon') diff --git a/daemon/Makefile.am b/daemon/Makefile.am index da174b3e..dc502240 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -90,6 +90,7 @@ test_session_SOURCES = \ test_session_LDADD = \ $(XLIB_LIBS) \ + $(EXTRA_DAEMON_LIBS) \ $(DAEMON_LIBS) \ $(PAM_LIBS) \ $(top_builddir)/common/libgdmcommon.la \ diff --git a/daemon/gdm-greeter-session.c b/daemon/gdm-greeter-session.c index 9664421e..940bd717 100644 --- a/daemon/gdm-greeter-session.c +++ b/daemon/gdm-greeter-session.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c index ed5ad371..e973c984 100644 --- a/daemon/gdm-server.c +++ b/daemon/gdm-server.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/daemon/gdm-session-record.c b/daemon/gdm-session-record.c index 758df13d..cd5de47e 100644 --- a/daemon/gdm-session-record.c +++ b/daemon/gdm-session-record.c @@ -85,7 +85,7 @@ record_set_username (UTMP *u, u->ut_user); #elif defined(HAVE_UT_UT_NAME) strncpy (u->ut_name, - username + username, sizeof (u->ut_name)); g_debug ("using ut_name %.*s", (int) sizeof (u->ut_name), @@ -228,7 +228,7 @@ gdm_session_record_login (GPid session_pid, updwtmpx (GDM_NEW_SESSION_RECORDS_FILE, &session_record); #elif defined(HAVE_UPDWTMP) updwtmp (GDM_NEW_SESSION_RECORDS_FILE, &session_record); -#elif defined(HAVE_LOGWTMP) && defined(HAVE_UT_UT_HOST) && !defined(HAVE_LOGIN) +#elif defined(HAVE_LOGWTMP) && defined(HAVE_UT_UT_HOST) #if defined(HAVE_UT_UT_USER) logwtmp (session_record.ut_line, session_record.ut_user, session_record.ut_host); #elif defined(HAVE_UT_UT_NAME) @@ -261,6 +261,8 @@ gdm_session_record_login (GPid session_pid, g_debug ("Adding new utmp record"); pututxline (&session_record); } +#elif defined(HAVE_LOGIN) + login (&session_record); #endif } @@ -296,7 +298,7 @@ gdm_session_record_logout (GPid session_pid, #elif defined (HAVE_UPDWTMP) updwtmp (GDM_NEW_SESSION_RECORDS_FILE, &session_record); #elif defined(HAVE_LOGWTMP) - logwtmp (record.ut_line, "", ""); + logwtmp (session_record.ut_line, "", ""); #endif /* Handle utmp */ diff --git a/daemon/gdm-session-worker-job.c b/daemon/gdm-session-worker-job.c index ca74e93b..c3a0d63c 100644 --- a/daemon/gdm-session-worker-job.c +++ b/daemon/gdm-session-worker-job.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include diff --git a/daemon/gdm-slave-proxy.c b/daemon/gdm-slave-proxy.c index e03f2f2a..2b51f705 100644 --- a/daemon/gdm-slave-proxy.c +++ b/daemon/gdm-slave-proxy.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/daemon/main.c b/daemon/main.c index fdb1d0d5..69f8d466 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -30,8 +30,9 @@ #include #include #include -#include +#include #include +#include #include #include -- cgit v1.2.1