Files
haikuports/app-shells/fish/patches/fish-2.3.1.patchset

106 lines
3.4 KiB
Plaintext

From 26e77664981aeb65b1327dc8fbc9f0a621bff84a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 18 Aug 2016 20:50:04 +0200
Subject: [PATCH] Haiku fix
---
configure.ac | 2 +-
share/tools/web_config/webconfig.py | 5 ++++-
src/env_universal_common.cpp | 13 +++++++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2d60a9a..feb43ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -355,7 +355,7 @@ AC_DEFINE([NOMACROS], [1], [Define to 1 to disable curses macros that conflict w
#
# Check for os dependant libraries for all binaries.
-AC_SEARCH_LIBS( connect, socket, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
+AC_SEARCH_LIBS( connect, socket network, , [AC_MSG_ERROR([Cannot find the socket library, needed to build this package.] )] )
AC_SEARCH_LIBS( nanosleep, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( shm_open, rt, , [AC_MSG_ERROR([Cannot find the rt library, needed to build this package.] )] )
AC_SEARCH_LIBS( pthread_create, pthread, , [AC_MSG_ERROR([Cannot find the pthread library, needed to build this package.] )] )
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py
index ee51744..4418bcb 100755
--- a/share/tools/web_config/webconfig.py
+++ b/share/tools/web_config/webconfig.py
@@ -20,7 +20,10 @@ else:
from urllib.parse import parse_qs
# Check to see if IPv6 is enabled in the kernel
-HAS_IPV6 = True
+# Not working in Haiku. FIXME!
+#HAS_IPV6 = True
+HAS_IPV6 = False
+# FIXME!
try:
s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s.close()
diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp
index 290975c..bcbb65a 100644
--- a/src/env_universal_common.cpp
+++ b/src/env_universal_common.cpp
@@ -9,6 +9,15 @@
#include "env_universal_common.h"
+#ifdef __HAIKU__
+#define _BSD_SOURCE
+
+#ifndef MAP_FILE
+#define MAP_FILE 0
+#endif
+
+#endif //Haiku
+
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
@@ -1072,7 +1081,11 @@ static bool get_mac_address(unsigned char macaddr[MAC_ADDRESS_MAX_LEN], const ch
{
for (const ifaddrs *p = ifap; p; p = p->ifa_next)
{
+ #ifndef __HAIKU__
if (p->ifa_addr->sa_family == AF_LINK)
+ #else
+ if (p->ifa_addr && p->ifa_addr->sa_family == AF_LINK)
+ #endif
{
if (p->ifa_name && p->ifa_name[0] &&
! strcmp((const char*)p->ifa_name, interface))
--
2.7.0
From 4fc160f28d37f7cf2dff76da2dca53cba3c1a646 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Mon, 24 Oct 2016 17:32:16 +0200
Subject: [PATCH] Support for Haiku's /bin/open to open files from cli with the
installed programs.
---
share/functions/open.fish | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/share/functions/open.fish b/share/functions/open.fish
index 533b3df..dd56e4c 100644
--- a/share/functions/open.fish
+++ b/share/functions/open.fish
@@ -21,6 +21,12 @@ if not test (uname) = Darwin
for i in $argv
xdg-open $i
end
+ #HAIKU have open in /bin
+ else if type -q -f /bin/open
+ for i in $argv
+ /bin/open $i
+ end
+ #HAIKU
else
echo (_ 'No open utility found. Try installing "xdg-open" or "xdg-utils".')
end
--
2.10.0