httrack: fix build

This commit is contained in:
Gerasim Troeglazov
2021-03-02 23:50:21 +10:00
parent 1a7ba509d3
commit 0ef2e0f2d8
2 changed files with 25 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ HTTrack is fully configurable, and has an integrated help system."
HOMEPAGE="https://www.httrack.com/"
COPYRIGHT="Xavier Roche"
LICENSE="GNU GPL v3"
REVISION="1"
REVISION="2"
SOURCE_URI="https://mirror.httrack.com/httrack-$portVersion.tar.gz"
CHECKSUM_SHA256="3477a0e5568e241c63c9899accbfcdb6aadef2812fcce0173688567b4c7d4025"
SOURCE_DIR="httrack-$portVersion"

View File

@@ -1,4 +1,4 @@
From 5f2e9cd70cdb49dceffe9b9570f76734232fcb9f Mon Sep 17 00:00:00 2001
From 212515aa37e4dc5c71ece6fd03e31756d384008f Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 2 Mar 2021 22:44:28 +1000
Subject: Fixes for Haiku
@@ -65,3 +65,26 @@ index a531284..12a1d93 100644
--
2.30.0
From 03f70ba5b001a19d6d15a7f1a157dc9aecd5863b Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 2 Mar 2021 23:49:44 +1000
Subject: Disable strnlen for haiku
diff --git a/src/htssafe.h b/src/htssafe.h
index 1349e23..57084c9 100644
--- a/src/htssafe.h
+++ b/src/htssafe.h
@@ -176,7 +176,7 @@ static HTS_UNUSED void htssafe_compile_time_check_(void) {
"overflow while copying '" #B "' to '"#A"'", __FILE__, __LINE__)
/** strnlen replacement (autotools). **/
-#if ( ! defined(_WIN32) && ! defined(HAVE_STRNLEN) )
+#if ( ! defined(_WIN32) && ! defined(__HAIKU__) && ! defined(HAVE_STRNLEN) )
static HTS_UNUSED size_t strnlen(const char *s, size_t maxlen) {
size_t i;
for(i = 0 ; i < maxlen && s[i] != '\0' ; i++) ;
--
2.30.0