ports/ftp/tnftpd/files/patch-tnftpd.h
Fernando Apesteguía 114a831ecb ftp/tnftpd: update to 20200704
Includes fix for clang11 -fno-common issue
While here, pet linters.

PR:	248831
Submitted by:	cejkar@fit.vutbr.cz (maintainer)
MFH:	2020Q3 (build fix, fno-common)
2020-09-02 06:40:06 +00:00

26 lines
573 B
C

FreeBSD does not have LOGIN_NAME_MAX, but it has MAXLOGNAME instead,
so use it as much as possible. Rewrite utmpx support.
--- tnftpd.h.orig 2019-01-29 13:06:14 UTC
+++ tnftpd.h
@@ -119,6 +119,8 @@
#endif
#if defined(HAVE_UTMP_H)
# include <utmp.h>
+#else
+# include <utmpx.h>
#endif
#if defined(HAVE_POLL)
@@ -565,7 +567,11 @@ int usleep(unsigned int);
#define TM_YEAR_BASE 1900
#if !defined(LOGIN_NAME_MAX)
+#if defined(MAXLOGNAME)
+# define LOGIN_NAME_MAX MAXLOGNAME
+#else
# define LOGIN_NAME_MAX (9)
+#endif
#endif
#if !defined(_POSIX_LOGIN_NAME_MAX)