Axel: update to an maintained source (#1279)

This commit is contained in:
miqlas
2017-04-16 21:32:17 +02:00
committed by waddlesplash
parent 4d843c5170
commit 788cb1455c
4 changed files with 108 additions and 90 deletions

View File

@@ -0,0 +1,47 @@
From 72baa8b5f0194657cb7d16a11d1048bc44d65b68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 16 Apr 2017 19:44:33 +0200
Subject: Fix for Haiku
diff --git a/src/tcp.c b/src/tcp.c
index bf4e128..0843889 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -38,6 +38,10 @@
#include "axel.h"
+#ifdef __HAIKU__
+#include <sys/sockio.h>
+#endif
+
static void tcp_error( char *buffer, char *hostname, int port, const char *reason )
{
sprintf( buffer, _("Unable to connect to server %s:%i: %s\n"),
--
2.12.2
From e15fadfefe3708ea2e03440827abf7166a22c046 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 16 Apr 2017 19:54:03 +0200
Subject: Haiku specific lib
diff --git a/configure.ac b/configure.ac
index 663640f..a6eced5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,9 @@ HP-UX )
fi
LDFLAGS="$LDFLAGS $AXEL_EXTRA_FLAGS -lintl -lpthread"
;;
+Haiku )
+ LDFLAGS="$LDFLAGS -lnetwork -lintl"
+;;
* )
LDFLAGS="$LDFLAGS -lintl -pthread"
;;
--
2.12.2

View File

@@ -1,41 +0,0 @@
From f86df22189a39918521e4b3470376e5bb6d77f17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 16 Apr 2017 18:58:10 +0200
Subject: Haiku supporting patchset
diff --git a/configure b/configure
index 81ecb99..3e1e838 100755
--- a/configure
+++ b/configure
@@ -200,6 +200,12 @@ SunOS )
echo 'Please keep in mind that you need GNU make to make Axel!'
echo ''
;;
+Haiku* )
+ echo 'LFLAGS+=-lnetwork' >> Makefile.settings
+ if [ "$i18n" = "1" ]; then
+ echo 'LFLAGS+=-lintl' >> Makefile.settings;
+ fi
+;;
CYGWIN_* )
echo 'LFLAGS+=-lpthread' >> Makefile.settings
if [ "$i18n" = "1" ]; then
diff --git a/tcp.c b/tcp.c
index 1551c23..7366c20 100644
--- a/tcp.c
+++ b/tcp.c
@@ -25,6 +25,10 @@
#include "axel.h"
+#ifdef __HAIKU__
+#include <sys/sockio.h>
+#endif
+
/* Get a TCP connection */
int tcp_connect( char *hostname, int port, char *local_if )
{
--
2.12.2