diff -urN wput.orig/Makefile.in wput/Makefile.in --- wput.orig/Makefile.in 2004-12-12 13:40:04.146801506 -0500 +++ wput/Makefile.in 2004-12-12 13:48:08.352295485 -0500 @@ -1,14 +1,18 @@ #wput makefile + prefix = @prefix@ -mandir = $(prefix)/man/man1 +datadir = $(prefix)/share +mandir = $(datadir)/man/man1 exec_prefix = @exec_prefix@ bindir=@bindir@ all clean win-clean: cd src && $(MAKE) $@ install: all - cp wput $(bindir) - cp doc/wput.1.gz $(mandir) + install -d $(DESTDIR)$(bindir) + install -m0755 wput $(DESTDIR)$(bindir) + install -d $(DESTDIR)$(mandir) + install -m0644 doc/wput.1.gz $(DESTDIR)$(mandir) @echo "----------------" @echo "Wput installed. See 'wput -h' or 'man wput' for usage information." @echo "Further documentation is located in the doc/USAGE.* files." diff -urN wput.orig/src/ftp.c wput/src/ftp.c --- wput.orig/src/ftp.c 2004-12-12 13:40:04.085811666 -0500 +++ wput/src/ftp.c 2004-12-12 13:42:26.493103988 -0500 @@ -531,7 +531,7 @@ #define DBUFSIZE 1024 - int fd; + int fd = -1; FILE * pipe = NULL; char databuf[DBUFSIZE]; int readbytes = 0;