diff options
author | Martin Matuska <mm@FreeBSD.org> | 2010-07-05 09:15:03 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2010-07-05 09:15:03 +0000 |
commit | f1d3916a106c9997594c83c06bb1f1da5848f745 (patch) | |
tree | 29c4508b6907751cbc11cff8c59d35d93b69cef7 /ftp/proftpd/files/patch-src-wtmp.c | |
parent | - Fix bug in ipupdate.pl (diff) |
- Update to 1.3.3a
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=257395
Diffstat (limited to 'ftp/proftpd/files/patch-src-wtmp.c')
-rw-r--r-- | ftp/proftpd/files/patch-src-wtmp.c | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/ftp/proftpd/files/patch-src-wtmp.c b/ftp/proftpd/files/patch-src-wtmp.c index 639332a410a8..afd717708886 100644 --- a/ftp/proftpd/files/patch-src-wtmp.c +++ b/ftp/proftpd/files/patch-src-wtmp.c @@ -1,47 +1,6 @@ ---- src/wtmp.c.orig 2009-02-18 19:24:50.000000000 +0100 -+++ src/wtmp.c 2010-05-13 16:18:54.711790750 +0200 -@@ -37,7 +37,9 @@ - int res = 0; - - #if ((defined(SVR4) || defined(__SVR4)) || \ -- (defined(__NetBSD__) && defined(HAVE_UTMPX_H))) && \ -+ ((defined(__NetBSD__) || \ -+ (defined(__FreeBSD_version) && __FreeBSD_version >= 900007)) && \ -+ defined(HAVE_UTMPX_H))) && \ - !(defined(LINUX) || defined(__hpux) || defined (_AIX)) - /* This "auxilliary" utmp doesn't exist under linux. */ - -@@ -51,8 +53,17 @@ - - static int fdx = -1; - --#if !defined(WTMPX_FILE) && defined(_PATH_WTMPX) --# define WTMPX_FILE _PATH_WTMPX -+#if !defined(WTMPX_FILE) -+# if defined(_PATH_WTMPX) -+# define WTMPX_FILE _PATH_WTMPX -+# elif defined(_PATH_UTMPX) -+# define WTMPX_FILE _PATH_UTMPX -+# else -+/* This path works for FreeBSD; not sure what to do for other platforms which -+ * don't define _PATH_WTMPX or _PATH_UTMPX. -+ */ -+# define WTMPX_FILE "/var/log/utx.log" -+# endif - #endif - - if (fdx < 0 && -@@ -80,7 +91,8 @@ - #if defined(__NetBSD__) && defined(HAVE_UTMPX_H) - memcpy(&utx.ut_ss, pr_netaddr_get_inaddr(ip), sizeof(utx.ut_ss)); - gettimeofday(&utx.ut_tv, NULL); -- -+#elif defined(__FreeBSD_version) && __FreeBSD_version >= 900007 && defined(HAVE_UTMPX_H) -+ gettimeofday(&utx.ut_tv, NULL); - #else /* SVR4 */ - utx.ut_syslen = strlen(utx.ut_host)+1; - -@@ -113,7 +125,9 @@ +--- src/wtmp.c.orig 2010-07-05 09:52:50.147213835 +0200 ++++ src/wtmp.c 2010-07-05 09:53:25.075513542 +0200 +@@ -126,7 +126,9 @@ } #else /* Non-SVR4 systems */ |