[tnftp] Link with system libedit rather than using internal one (#1079639)
David Cantrell
dcantrel at fedoraproject.org
Wed Jun 25 18:42:16 UTC 2014
commit bbeaaa03141a143c58fe53c948abe6aef83494e1
Author: David Cantrell <dcantrell at redhat.com>
Date: Wed Jun 25 14:16:52 2014 -0400
Link with system libedit rather than using internal one (#1079639)
.gitignore | 1 +
sources | 1 +
tnftp-20130505-autognu.patch | 44 +++--
tnftp-20130505-portability.patch | 359 +++++++++++++++++++++++++++++++++++---
tnftp.spec | 4 +-
5 files changed, 369 insertions(+), 40 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 29c2a83..ec806f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/stringlist.h
/vis.h
/glob.h
+/tzfile.h
diff --git a/sources b/sources
index 4c55501..15dae99 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,5 @@
004635931bdeec3912fc8faf5654dbb0 glob.h
+31dfa9297692de7fe00dc441b634dbc3 tzfile.h
66148f5fa2fb23e3252b45ad76ef7ae0 vis.h
66e218d02ec7d9fc39ab70ba2900305a tnftp-20130505.tar.gz
ee9318e2eef9d4e58abecade62b92170 stringlist.h
diff --git a/tnftp-20130505-autognu.patch b/tnftp-20130505-autognu.patch
index 0328648..9caee5b 100644
--- a/tnftp-20130505-autognu.patch
+++ b/tnftp-20130505-autognu.patch
@@ -1,6 +1,6 @@
-diff -up tnftp-20130505/configure.ac.orig tnftp-20130505/configure.ac
---- tnftp-20130505/configure.ac.orig 2013-05-05 09:50:50.000000000 -0400
-+++ tnftp-20130505/configure.ac 2014-06-24 14:40:08.960747232 -0400
+diff -up tnftp-20130505/configure.ac.autognu tnftp-20130505/configure.ac
+--- tnftp-20130505/configure.ac.autognu 2013-05-05 09:50:50.000000000 -0400
++++ tnftp-20130505/configure.ac 2014-06-25 14:09:59.416747232 -0400
@@ -13,7 +13,8 @@ AC_REVISION([$Revision: 1.25 $])
AS_SHELL_SANITIZE()
@@ -19,7 +19,15 @@ diff -up tnftp-20130505/configure.ac.orig tnftp-20130505/configure.ac
AC_PROG_CC()
AC_PROG_AWK()
AC_PROG_LIBTOOL()
-@@ -420,8 +422,6 @@ AM_CONDITIONAL([USE_LIBEDIT], [test "$op
+@@ -383,6 +385,7 @@ exit(!res);
+ AS_IF([test "$opt_editcomplete" = yes],
+ [AC_MSG_NOTICE([--enable-editcomplete; using internal libedit])],
+ [CFLAGS="-DNO_EDITCOMPLETE $CFLAGS"])
++PKG_CHECK_MODULES([LIBEDIT], [libedit >= 3.1])
+
+ # Replace sl_init() (et al) if it provides the older API.
+ #
+@@ -420,8 +423,6 @@ AM_CONDITIONAL([USE_LIBEDIT], [test "$op
#
AC_CONFIG_FILES([
Makefile
@@ -28,9 +36,9 @@ diff -up tnftp-20130505/configure.ac.orig tnftp-20130505/configure.ac
libnetbsd/Makefile
src/Makefile
])
-diff -up tnftp-20130505/libnetbsd/Makefile.am.orig tnftp-20130505/libnetbsd/Makefile.am
---- tnftp-20130505/libnetbsd/Makefile.am.orig 2010-01-04 01:24:20.000000000 -0500
-+++ tnftp-20130505/libnetbsd/Makefile.am 2014-06-24 13:47:17.453747232 -0400
+diff -up tnftp-20130505/libnetbsd/Makefile.am.autognu tnftp-20130505/libnetbsd/Makefile.am
+--- tnftp-20130505/libnetbsd/Makefile.am.autognu 2010-01-04 01:24:20.000000000 -0500
++++ tnftp-20130505/libnetbsd/Makefile.am 2014-06-25 14:06:50.369747232 -0400
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES = libnetbsd.la
libnetbsd_la_SOURCES =
@@ -40,9 +48,9 @@ diff -up tnftp-20130505/libnetbsd/Makefile.am.orig tnftp-20130505/libnetbsd/Make
-I$(srcdir) \
-I$(top_srcdir) \
-I$(top_builddir)
-diff -up tnftp-20130505/Makefile.am.orig tnftp-20130505/Makefile.am
---- tnftp-20130505/Makefile.am.orig 2013-05-05 09:06:37.000000000 -0400
-+++ tnftp-20130505/Makefile.am 2014-06-24 13:48:39.013747232 -0400
+diff -up tnftp-20130505/Makefile.am.autognu tnftp-20130505/Makefile.am
+--- tnftp-20130505/Makefile.am.autognu 2013-05-05 09:06:37.000000000 -0400
++++ tnftp-20130505/Makefile.am 2014-06-25 14:06:50.369747232 -0400
@@ -4,10 +4,6 @@ ACLOCAL_AMFLAGS = -I buildaux
SUBDIRS = libnetbsd
@@ -54,9 +62,9 @@ diff -up tnftp-20130505/Makefile.am.orig tnftp-20130505/Makefile.am
SUBDIRS += src
EXTRA_DIST = \
-diff -up tnftp-20130505/src/Makefile.am.orig tnftp-20130505/src/Makefile.am
---- tnftp-20130505/src/Makefile.am.orig 2013-05-05 09:29:19.000000000 -0400
-+++ tnftp-20130505/src/Makefile.am 2014-06-24 13:46:27.342747232 -0400
+diff -up tnftp-20130505/src/Makefile.am.autognu tnftp-20130505/src/Makefile.am
+--- tnftp-20130505/src/Makefile.am.autognu 2013-05-05 09:29:19.000000000 -0400
++++ tnftp-20130505/src/Makefile.am 2014-06-25 14:09:24.792747232 -0400
@@ -14,7 +14,7 @@ tnftp_SOURCES = \
ruserpass.c \
util.c
@@ -66,15 +74,21 @@ diff -up tnftp-20130505/src/Makefile.am.orig tnftp-20130505/src/Makefile.am
-DHAVE_TNFTPD_H=1 \
-D_DEFAULT_CONFDIR=\"${sysconfdir}\" \
-I$(srcdir) \
-@@ -27,7 +27,7 @@ tnftp_LDADD = \
+@@ -27,11 +27,11 @@ tnftp_LDADD = \
if USE_LIBEDIT
-tnftp_CPPFLAGS += \
+- -I$(top_srcdir)/libedit
+tnftp_AM_CPPFLAGS += \
- -I$(top_srcdir)/libedit
++ $(LIBEDIT_CFLAGS)
tnftp_LDADD += \
+- ../libedit/libedit.la
++ $(LIBEDIT_LIBS)
+ endif
+
+
@@ -39,7 +39,7 @@ if WITH_SSL
tnftp_SOURCES += \
ssl.c
diff --git a/tnftp-20130505-portability.patch b/tnftp-20130505-portability.patch
index 4382c9d..2f4ae34 100644
--- a/tnftp-20130505-portability.patch
+++ b/tnftp-20130505-portability.patch
@@ -1,6 +1,6 @@
-diff -up tnftp-20130505/libnetbsd/fgetln.c.orig tnftp-20130505/libnetbsd/fgetln.c
---- tnftp-20130505/libnetbsd/fgetln.c.orig 2008-04-29 06:26:23.000000000 -0400
-+++ tnftp-20130505/libnetbsd/fgetln.c 2014-06-25 08:28:25.113747232 -0400
+diff -up tnftp-20130505/libnetbsd/fgetln.c.portability tnftp-20130505/libnetbsd/fgetln.c
+--- tnftp-20130505/libnetbsd/fgetln.c.portability 2008-04-29 06:26:23.000000000 -0400
++++ tnftp-20130505/libnetbsd/fgetln.c 2014-06-25 14:10:16.252747232 -0400
@@ -29,6 +29,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -11,9 +11,9 @@ diff -up tnftp-20130505/libnetbsd/fgetln.c.orig tnftp-20130505/libnetbsd/fgetln.
#include "tnftp.h"
char *
-diff -up tnftp-20130505/libnetbsd/glob.c.orig tnftp-20130505/libnetbsd/glob.c
---- tnftp-20130505/libnetbsd/glob.c.orig 2013-05-05 09:20:16.000000000 -0400
-+++ tnftp-20130505/libnetbsd/glob.c 2014-06-25 09:31:05.919747232 -0400
+diff -up tnftp-20130505/libnetbsd/glob.c.portability tnftp-20130505/libnetbsd/glob.c
+--- tnftp-20130505/libnetbsd/glob.c.portability 2013-05-05 09:20:16.000000000 -0400
++++ tnftp-20130505/libnetbsd/glob.c 2014-06-25 14:10:16.253747232 -0400
@@ -61,8 +61,6 @@
#include "tnftp.h"
@@ -34,9 +34,9 @@ diff -up tnftp-20130505/libnetbsd/glob.c.orig tnftp-20130505/libnetbsd/glob.c
#define NO_GETPW_R
-diff -up tnftp-20130505/libnetbsd/setprogname.c.orig tnftp-20130505/libnetbsd/setprogname.c
---- tnftp-20130505/libnetbsd/setprogname.c.orig 2008-04-29 06:26:23.000000000 -0400
-+++ tnftp-20130505/libnetbsd/setprogname.c 2014-06-25 08:28:44.729747232 -0400
+diff -up tnftp-20130505/libnetbsd/setprogname.c.portability tnftp-20130505/libnetbsd/setprogname.c
+--- tnftp-20130505/libnetbsd/setprogname.c.portability 2008-04-29 06:26:23.000000000 -0400
++++ tnftp-20130505/libnetbsd/setprogname.c 2014-06-25 14:10:16.253747232 -0400
@@ -30,6 +30,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -45,9 +45,9 @@ diff -up tnftp-20130505/libnetbsd/setprogname.c.orig tnftp-20130505/libnetbsd/se
#include "tnftp.h"
static const char *__progname = "<unset_progname>";
-diff -up tnftp-20130505/libnetbsd/sl_init.c.orig tnftp-20130505/libnetbsd/sl_init.c
---- tnftp-20130505/libnetbsd/sl_init.c.orig 2008-04-29 06:26:23.000000000 -0400
-+++ tnftp-20130505/libnetbsd/sl_init.c 2014-06-25 08:33:51.727747232 -0400
+diff -up tnftp-20130505/libnetbsd/sl_init.c.portability tnftp-20130505/libnetbsd/sl_init.c
+--- tnftp-20130505/libnetbsd/sl_init.c.portability 2008-04-29 06:26:23.000000000 -0400
++++ tnftp-20130505/libnetbsd/sl_init.c 2014-06-25 14:10:16.253747232 -0400
@@ -30,6 +30,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -66,9 +66,9 @@ diff -up tnftp-20130505/libnetbsd/sl_init.c.orig tnftp-20130505/libnetbsd/sl_ini
{
size_t i;
-diff -up tnftp-20130505/libnetbsd/strlcat.c.orig tnftp-20130505/libnetbsd/strlcat.c
---- tnftp-20130505/libnetbsd/strlcat.c.orig 2005-05-16 02:55:48.000000000 -0400
-+++ tnftp-20130505/libnetbsd/strlcat.c 2014-06-25 08:35:57.510747232 -0400
+diff -up tnftp-20130505/libnetbsd/strlcat.c.portability tnftp-20130505/libnetbsd/strlcat.c
+--- tnftp-20130505/libnetbsd/strlcat.c.portability 2005-05-16 02:55:48.000000000 -0400
++++ tnftp-20130505/libnetbsd/strlcat.c 2014-06-25 14:10:16.253747232 -0400
@@ -18,6 +18,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
@@ -78,9 +78,9 @@ diff -up tnftp-20130505/libnetbsd/strlcat.c.orig tnftp-20130505/libnetbsd/strlca
#include "tnftp.h"
/*
-diff -up tnftp-20130505/libnetbsd/strlcpy.c.orig tnftp-20130505/libnetbsd/strlcpy.c
---- tnftp-20130505/libnetbsd/strlcpy.c.orig 2005-05-16 02:58:06.000000000 -0400
-+++ tnftp-20130505/libnetbsd/strlcpy.c 2014-06-25 08:35:41.030747232 -0400
+diff -up tnftp-20130505/libnetbsd/strlcpy.c.portability tnftp-20130505/libnetbsd/strlcpy.c
+--- tnftp-20130505/libnetbsd/strlcpy.c.portability 2005-05-16 02:58:06.000000000 -0400
++++ tnftp-20130505/libnetbsd/strlcpy.c 2014-06-25 14:10:16.253747232 -0400
@@ -18,6 +18,7 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
@@ -89,9 +89,9 @@ diff -up tnftp-20130505/libnetbsd/strlcpy.c.orig tnftp-20130505/libnetbsd/strlcp
#include "tnftp.h"
/*
-diff -up tnftp-20130505/libnetbsd/strunvis.c.orig tnftp-20130505/libnetbsd/strunvis.c
---- tnftp-20130505/libnetbsd/strunvis.c.orig 2005-06-01 07:48:49.000000000 -0400
-+++ tnftp-20130505/libnetbsd/strunvis.c 2014-06-25 08:43:44.603747232 -0400
+diff -up tnftp-20130505/libnetbsd/strunvis.c.portability tnftp-20130505/libnetbsd/strunvis.c
+--- tnftp-20130505/libnetbsd/strunvis.c.portability 2005-06-01 07:48:49.000000000 -0400
++++ tnftp-20130505/libnetbsd/strunvis.c 2014-06-25 14:10:16.254747232 -0400
@@ -30,6 +30,7 @@
* SUCH DAMAGE.
*/
@@ -100,9 +100,9 @@ diff -up tnftp-20130505/libnetbsd/strunvis.c.orig tnftp-20130505/libnetbsd/strun
#include "tnftp.h"
/*
-diff -up tnftp-20130505/libnetbsd/strvis.c.orig tnftp-20130505/libnetbsd/strvis.c
---- tnftp-20130505/libnetbsd/strvis.c.orig 2008-04-29 06:26:23.000000000 -0400
-+++ tnftp-20130505/libnetbsd/strvis.c 2014-06-25 09:07:50.713747232 -0400
+diff -up tnftp-20130505/libnetbsd/strvis.c.portability tnftp-20130505/libnetbsd/strvis.c
+--- tnftp-20130505/libnetbsd/strvis.c.portability 2008-04-29 06:26:23.000000000 -0400
++++ tnftp-20130505/libnetbsd/strvis.c 2014-06-25 14:10:16.254747232 -0400
@@ -56,6 +56,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -114,3 +114,314 @@ diff -up tnftp-20130505/libnetbsd/strvis.c.orig tnftp-20130505/libnetbsd/strvis.
#include "tnftp.h"
#undef BELL
+diff -up tnftp-20130505/src/cmds.c.portability tnftp-20130505/src/cmds.c
+--- tnftp-20130505/src/cmds.c.portability 2013-05-05 07:17:37.000000000 -0400
++++ tnftp-20130505/src/cmds.c 2014-06-25 14:10:16.254747232 -0400
+@@ -94,8 +94,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ #if 0
+@@ -108,6 +106,7 @@ __RCSID(" NetBSD: cmds.c,v 1.135 2012/12
+ /*
+ * FTP User Program -- Command Routines.
+ */
++#include <sys/param.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+@@ -128,8 +127,6 @@ __RCSID(" NetBSD: cmds.c,v 1.135 2012/12
+ #include <time.h>
+ #include <unistd.h>
+
+-#endif /* tnftp */
+-
+ #include "ftp_var.h"
+ #include "version.h"
+
+@@ -150,7 +147,7 @@ static struct types {
+ static sigjmp_buf jabort;
+
+ static int confirm(const char *, const char *);
+-__dead static void mintr(int);
++static void mintr(int);
+ static void mabort(const char *);
+ static void set_type(const char *);
+
+diff -up tnftp-20130505/src/complete.c.portability tnftp-20130505/src/complete.c
+--- tnftp-20130505/src/complete.c.portability 2009-05-20 08:54:51.000000000 -0400
++++ tnftp-20130505/src/complete.c 2014-06-25 14:10:16.254747232 -0400
+@@ -32,8 +32,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID(" NetBSD: complete.c,v 1.46 2009/04/12 10:18:52 lukem Exp ");
+@@ -51,8 +49,7 @@ __RCSID(" NetBSD: complete.c,v 1.46 2009
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-
+-#endif /* tnftp */
++#include <dirent.h>
+
+ #include "ftp_var.h"
+
+diff -up tnftp-20130505/src/extern.h.portability tnftp-20130505/src/extern.h
+--- tnftp-20130505/src/extern.h.portability 2013-05-05 07:17:37.000000000 -0400
++++ tnftp-20130505/src/extern.h 2014-06-25 14:10:16.255747232 -0400
+@@ -90,6 +90,8 @@
+ * SUCH DAMAGE.
+ */
+
++#include <stringlist.h>
++
+ struct sockaddr;
+ struct tm;
+ struct addrinfo;
+@@ -143,7 +145,7 @@ void help(int, char **);
+ char *hookup(const char *, const char *);
+ void idlecmd(int, char **);
+ int initconn(void);
+-__dead void intr(int);
++void intr(int);
+ int isipv6addr(const char *);
+ void list_vertical(StringList *);
+ void lcd(int, char **);
+@@ -167,7 +169,7 @@ void page(int, char **);
+ const char *parse_rfc2616time(struct tm *, const char *);
+ int parserate(int, char **, int);
+ char *prompt(void);
+-__dead void proxabort(int);
++void proxabort(int);
+ void proxtrans(const char *, const char *, const char *);
+ void psabort(int);
+ void pswitch(int);
+diff -up tnftp-20130505/src/fetch.c.portability tnftp-20130505/src/fetch.c
+--- tnftp-20130505/src/fetch.c.portability 2013-05-05 07:17:37.000000000 -0400
++++ tnftp-20130505/src/fetch.c 2014-06-25 14:10:16.255747232 -0400
+@@ -35,8 +35,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID(" NetBSD: fetch.c,v 1.202 2013/02/23 13:47:36 christos Exp ");
+@@ -69,8 +67,6 @@ __RCSID(" NetBSD: fetch.c,v 1.202 2013/0
+ #include <unistd.h>
+ #include <time.h>
+
+-#endif /* tnftp */
+-
+ #include "ssl.h"
+ #include "ftp_var.h"
+ #include "version.h"
+@@ -86,7 +82,7 @@ typedef enum {
+ CLASSIC_URL_T
+ } url_t;
+
+-__dead static void aborthttp(int);
++static void aborthttp(int);
+ #ifndef NO_AUTH
+ static int auth_url(const char *, char **, const char *, const char *);
+ static void base64_encode(const unsigned char *, size_t, unsigned char *);
+diff -up tnftp-20130505/src/ftp.c.portability tnftp-20130505/src/ftp.c
+--- tnftp-20130505/src/ftp.c.portability 2013-05-05 07:17:37.000000000 -0400
++++ tnftp-20130505/src/ftp.c 2014-06-25 14:10:16.255747232 -0400
+@@ -91,8 +91,6 @@
+ #include "tnftp.h"
+ #include <arpa/telnet.h>
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ #if 0
+@@ -127,8 +125,6 @@ __RCSID(" NetBSD: ftp.c,v 1.164 2012/07/
+ #include <unistd.h>
+ #include <stdarg.h>
+
+-#endif /* tnftp */
+-
+ #include "ftp_var.h"
+
+ volatile sig_atomic_t abrtflag;
+@@ -140,7 +136,7 @@ int ptflag = 0;
+ char pasv[BUFSIZ]; /* passive port for proxy data connection */
+
+ static int empty(FILE *, FILE *, int);
+-__dead static void abort_squared(int);
++static void abort_squared(int);
+
+ struct sockinet {
+ union sockunion {
+@@ -548,7 +544,7 @@ empty(FILE *ecin, FILE *din, int sec)
+
+ sigjmp_buf xferabort;
+
+-__dead static void
++static void
+ abortxfer(int notused)
+ {
+ char msgbuf[100];
+@@ -1832,7 +1828,7 @@ pswitch(int flag)
+ }
+ }
+
+-__dead static void
++static void
+ abortpt(int notused)
+ {
+
+diff -up tnftp-20130505/src/ftp_var.h.portability tnftp-20130505/src/ftp_var.h
+--- tnftp-20130505/src/ftp_var.h.portability 2013-05-05 07:17:38.000000000 -0400
++++ tnftp-20130505/src/ftp_var.h 2014-06-25 14:10:16.255747232 -0400
+@@ -101,8 +101,6 @@
+ #define NO_PROGRESS
+ #endif
+
+-#if 0 /* tnftp */
+-
+ #include <sys/param.h>
+
+ #include <netinet/in.h>
+@@ -113,8 +111,6 @@
+ #include <setjmp.h>
+ #include <stringlist.h>
+
+-#endif /* tnftp */
+-
+ #ifndef NO_EDITCOMPLETE
+ #include <histedit.h>
+ #endif /* !NO_EDITCOMPLETE */
+diff -up tnftp-20130505/src/main.c.portability tnftp-20130505/src/main.c
+--- tnftp-20130505/src/main.c.portability 2013-05-05 07:48:16.000000000 -0400
++++ tnftp-20130505/src/main.c 2014-06-25 14:10:16.256747232 -0400
+@@ -90,8 +90,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __COPYRIGHT("@(#) Copyright (c) 1985, 1989, 1993, 1994\
+@@ -126,8 +124,6 @@ __RCSID(" NetBSD: main.c,v 1.122 2012/12
+ #include <unistd.h>
+ #include <locale.h>
+
+-#endif /* tnftp */
+-
+ #define GLOBAL /* force GLOBAL decls in ftp_var.h to be declared */
+ #include "ftp_var.h"
+
+@@ -137,7 +133,7 @@ __RCSID(" NetBSD: main.c,v 1.122 2012/12
+ #define NO_PROXY "no_proxy" /* env var with list of non-proxied
+ * hosts, comma or space separated */
+
+-__dead static void usage(void);
++static void usage(void);
+ static void setupoption(const char *, const char *, const char *);
+
+ int
+diff -up tnftp-20130505/src/progressbar.c.portability tnftp-20130505/src/progressbar.c
+--- tnftp-20130505/src/progressbar.c.portability 2013-05-05 07:17:38.000000000 -0400
++++ tnftp-20130505/src/progressbar.c 2014-06-25 14:11:17.979747232 -0400
+@@ -32,8 +32,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID(" NetBSD: progressbar.c,v 1.22 2012/06/27 22:07:36 riastradh Exp ");
+@@ -56,8 +54,6 @@ __RCSID(" NetBSD: progressbar.c,v 1.22 2
+ #include <tzfile.h>
+ #include <unistd.h>
+
+-#endif /* tnftp */
+-
+ #include "progressbar.h"
+
+ #if !defined(NO_PROGRESS)
+diff -up tnftp-20130505/src/ruserpass.c.portability tnftp-20130505/src/ruserpass.c
+--- tnftp-20130505/src/ruserpass.c.portability 2007-08-06 00:33:19.000000000 -0400
++++ tnftp-20130505/src/ruserpass.c 2014-06-25 14:10:16.256747232 -0400
+@@ -32,8 +32,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ #if 0
+@@ -55,8 +53,6 @@ __RCSID(" NetBSD: ruserpass.c,v 1.33 200
+ #include <string.h>
+ #include <unistd.h>
+
+-#endif /* tnftp */
+-
+ #include "ftp_var.h"
+
+ static int token(void);
+diff -up tnftp-20130505/src/ssl.c.portability tnftp-20130505/src/ssl.c
+--- tnftp-20130505/src/ssl.c.portability 2013-05-05 09:17:06.000000000 -0400
++++ tnftp-20130505/src/ssl.c 2014-06-25 14:10:16.256747232 -0400
+@@ -34,8 +34,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID(" NetBSD: ssl.c,v 1.2 2012/12/24 22:12:28 christos Exp ");
+@@ -51,7 +49,6 @@ __RCSID(" NetBSD: ssl.c,v 1.2 2012/12/24
+
+ #include <netinet/tcp.h>
+ #include <netinet/in.h>
+-#endif /* tnftp */
+
+ #include <openssl/crypto.h>
+ #include <openssl/x509.h>
+diff -up tnftp-20130505/src/util.c.portability tnftp-20130505/src/util.c
+--- tnftp-20130505/src/util.c.portability 2013-05-05 07:51:43.000000000 -0400
++++ tnftp-20130505/src/util.c 2014-06-25 14:10:16.256747232 -0400
+@@ -65,8 +65,6 @@
+
+ #include "tnftp.h"
+
+-#if 0 /* tnftp */
+-
+ #include <sys/cdefs.h>
+ #ifndef lint
+ __RCSID(" NetBSD: util.c,v 1.158 2013/02/19 23:29:15 dsl Exp ");
+@@ -100,8 +98,6 @@ __RCSID(" NetBSD: util.c,v 1.158 2013/02
+ #include <tzfile.h>
+ #include <unistd.h>
+
+-#endif /* tnftp */
+-
+ #include "ftp_var.h"
+
+ /*
+@@ -1438,7 +1434,7 @@ ftp_connect(int sock, const struct socka
+ if (timeout < 0)
+ timeout = 0;
+ } else {
+- timeout = INFTIM;
++ timeout = -1;
+ }
+ pfd[0].revents = 0;
+ rv = ftp_poll(pfd, 1, timeout);
diff --git a/tnftp.spec b/tnftp.spec
index 7cebe17..7f4040c 100644
--- a/tnftp.spec
+++ b/tnftp.spec
@@ -13,6 +13,7 @@ Source0: ftp://ftp.netbsd.org/pub/NetBSD/misc/%{name}/%{name}-%{version}.t
Source1: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/include/stringlist.h
Source2: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/include/vis.h
Source3: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/include/glob.h
+Source4: ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/include/tzfile.h
Patch0: tnftp-20130505-autognu.patch
Patch1: tnftp-20130505-portability.patch
@@ -43,11 +44,12 @@ autoreconf -i
install -m 0644 %{SOURCE1} stringlist.h
install -m 0644 %{SOURCE2} vis.h
install -m 0644 %{SOURCE3} glob.h
+install -m 0644 %{SOURCE4} tzfile.h
sed -i -e '/#include <sys\/featuretest\.h>/d' glob.h
%build
-export CFLAGS="%{optflags} -I$(pwd) -D_GNU_SOURCE -D__LIBC12_SOURCE__ -D_NETBSD_SOURCE"
+export CFLAGS="%{optflags} -I$(pwd) -D_GNU_SOURCE -D__LIBC12_SOURCE__ -D_NETBSD_SOURCE -DDIRENT_MISSING_D_NAMLEN -Dlint"
%configure --enable-editcomplete --enable-ipv6 --enable-ssl
make %{?_smp_mflags}
More information about the scm-commits
mailing list