summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-11-19 21:52:51 +0000
committerWilliam Jon McCann <mccann@src.gnome.org>2007-11-19 21:52:51 +0000
commit5420f09b09a0baaaaa89e168dbd2dfc88723b03c (patch)
treee52b4a7648c0fc8c251624d27c71fab82fe644a1 /daemon
parent6723555de25b475726e97e1b48a63e8ac6112a87 (diff)
downloadgdm-5420f09b09a0baaaaa89e168dbd2dfc88723b03c.tar.gz
Fix build on FreeBSD. Patch from: Joe Marcus Clarke <marcus@freebsd.org>
2007-11-19 William Jon McCann <mccann@jhu.edu> * 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 <marcus@freebsd.org> svn path=/trunk/; revision=5515
Diffstat (limited to 'daemon')
-rw-r--r--daemon/Makefile.am1
-rw-r--r--daemon/gdm-greeter-session.c1
-rw-r--r--daemon/gdm-server.c1
-rw-r--r--daemon/gdm-session-record.c8
-rw-r--r--daemon/gdm-session-worker-job.c1
-rw-r--r--daemon/gdm-slave-proxy.c1
-rw-r--r--daemon/main.c3
7 files changed, 12 insertions, 4 deletions
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 <ctype.h>
#include <pwd.h>
#include <grp.h>
+#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
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 <pwd.h>
#include <grp.h>
#include <signal.h>
+#include <sys/resource.h>
#include <glib.h>
#include <glib/gi18n.h>
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 <ctype.h>
#include <pwd.h>
#include <grp.h>
+#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
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 <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
+#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
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 <fcntl.h>
#include <pwd.h>
#include <grp.h>
-#include <wait.h>
+#include <sys/wait.h>
#include <locale.h>
+#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>