Commit 5420f09b authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

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
parent 6723555d
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>
2007-11-19 Ray Strode <rstrode@redhat.com>
* data/Makefile.am:
......
......@@ -22,6 +22,7 @@
#ifndef _GDM_COMMON_UNKNOWN_H
#define _GDM_COMMON_UNKNOWN_H
#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>
#include <glib.h>
......
......@@ -504,9 +504,15 @@ dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS(utmp.h utmpx.h libutil.h sys/param.h)
AC_CHECK_FUNCS([getutxent updwtmpx updwtmp])
AC_CHECK_LIB(util, login)
AC_CHECK_LIB(util, logout)
AC_CHECK_LIB(util, logwtmp)
AC_CHECK_LIB(util, login, [
AC_DEFINE(HAVE_LOGIN)
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
AC_CHECK_LIB(util, logout, [
AC_DEFINE(HAVE_LOGOUT)
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
AC_CHECK_LIB(util, logwtmp, [
AC_DEFINE(HAVE_LOGWTMP)
EXTRA_DAEMON_LIBS="$EXTRA_DAEMON_LIBS -lutil" ])
GDM_CHECK_UTMP
AC_MSG_CHECKING(if utmpx structure has ut_syslen field)
......
......@@ -90,6 +90,7 @@ test_session_SOURCES = \
test_session_LDADD = \
$(XLIB_LIBS) \
$(EXTRA_DAEMON_LIBS) \
$(DAEMON_LIBS) \
$(PAM_LIBS) \
$(top_builddir)/common/libgdmcommon.la \
......
......@@ -31,6 +31,7 @@
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -32,6 +32,7 @@
#include <pwd.h>
#include <grp.h>
#include <signal.h>
#include <sys/resource.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -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 */
......
......@@ -31,6 +31,7 @@
#include <ctype.h>
#include <pwd.h>
#include <grp.h>
#include <signal.h>
#include <glib.h>
#include <glib/gi18n.h>
......
......@@ -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>
......
......@@ -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>
......
......@@ -21,6 +21,8 @@
#include "config.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
......
......@@ -26,6 +26,8 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment