Files
haikuports/net-misc/wput/patches/wput-0.6.1.patch

73 lines
2.3 KiB
Diff

diff -urN wput-0.6.1/Makefile.in wput-0.6.1-haiku/Makefile.in
--- wput-0.6.1/Makefile.in 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/Makefile.in 2008-07-01 13:44:33.000000000 +0000
@@ -16,8 +16,10 @@
install: all
cd po && $(MAKE) $(MAKEDEFS) $@
- install -m0755 wput $(bindir)
- install -m0644 doc/wput.1.gz $(mandir)
+ mkdir -p $(DESTDIR)$(bindir)
+ mkdir -p $(DESTDIR)$(mandir)
+ install -m0755 wput $(DESTDIR)$(bindir)
+ 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-0.6.1/configure.in wput-0.6.1-haiku/configure.in
--- wput-0.6.1/configure.in 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/configure.in 2008-07-01 10:53:25.000000000 +0000
@@ -171,6 +171,7 @@
LIBS="-lsocket $LIBS";;
SCO*) CC=${CC-"cc -belf"}
LIBS="-lsocket $LIBS";;
+Haiku*) LIBS="-lnetwork $LIBS";;
esac
AC_CONFIG_HEADER(src/config.h)
AC_SUBST(GETOPT)
diff -urN wput-0.6.1/src/progress.c wput-0.6.1-haiku/src/progress.c
--- wput-0.6.1/src/progress.c 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/progress.c 2008-07-01 13:39:16.000000000 +0000
@@ -219,14 +219,16 @@
unsigned short int terminal_width = 80;
int get_term_width(void) {
+ int termwidth = 80;
+#ifndef __HAIKU__
struct winsize win;
char * p;
- int termwidth = 80;
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &win) == -1 || !win.ws_col) {
if ((p = getenv("COLUMNS")) != NULL)
termwidth = atoi(p);
} else
termwidth = win.ws_col;
+#endif
return termwidth;
}
diff -urN wput-0.6.1/src/socketlib.c wput-0.6.1-haiku/src/socketlib.c
--- wput-0.6.1/src/socketlib.c 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/socketlib.c 2008-07-01 10:42:33.000000000 +0000
@@ -48,7 +48,7 @@
#ifndef WIN32
#include <netdb.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
diff -urN wput-0.6.1/src/wput.h wput-0.6.1-haiku/src/wput.h
--- wput-0.6.1/src/wput.h 2007-12-12 17:30:04.000000000 +0000
+++ wput-0.6.1-haiku/src/wput.h 2008-07-01 10:42:16.000000000 +0000
@@ -18,7 +18,7 @@
# include <sys/uio.h>
# include <strings.h>
-# include <sys/errno.h>
+# include <errno.h>
# include <pwd.h>
# define WINCONV