diff options
author | Martin Matuska <mm@FreeBSD.org> | 2010-05-13 14:30:42 +0000 |
---|---|---|
committer | Martin Matuska <mm@FreeBSD.org> | 2010-05-13 14:30:42 +0000 |
commit | 0e050d80bd605c6c5507b01cc7dd36dd0a6c8064 (patch) | |
tree | f706e88cba226602ff444291155d973fd3b4a65d /ftp | |
parent | 483bbaa7763f799928904db763a9cd7948bd647d (diff) | |
download | ports-0e050d80bd605c6c5507b01cc7dd36dd0a6c8064.tar.gz ports-0e050d80bd605c6c5507b01cc7dd36dd0a6c8064.zip |
Notes
Diffstat (limited to 'ftp')
-rw-r--r-- | ftp/proftpd/files/patch-src-wtmp.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/ftp/proftpd/files/patch-src-wtmp.c b/ftp/proftpd/files/patch-src-wtmp.c new file mode 100644 index 000000000000..639332a410a8 --- /dev/null +++ b/ftp/proftpd/files/patch-src-wtmp.c @@ -0,0 +1,53 @@ +--- 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 @@ + } + + #else /* Non-SVR4 systems */ ++#if !defined(__FreeBSD_version) || __FreeBSD_version < 900007 || !defined(HAVE_UTMPX_H) + struct utmp ut; ++#endif + static int fd = -1; + + if (fd < 0 && |