mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 08:10:07 +02:00
139 lines
3.3 KiB
Plaintext
139 lines
3.3 KiB
Plaintext
From 2cffda87a2ad75c7bb994804d298c24dae2a6790 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sun, 20 Nov 2022 10:35:55 +0100
|
|
Subject: fix includes on Haiku
|
|
|
|
|
|
diff --git a/lib/local_filesys.cpp b/lib/local_filesys.cpp
|
|
index 239f709..d49541f 100644
|
|
--- a/lib/local_filesys.cpp
|
|
+++ b/lib/local_filesys.cpp
|
|
@@ -9,7 +9,7 @@
|
|
#include <winternl.h>
|
|
#else
|
|
#include <errno.h>
|
|
-#include <sys/fcntl.h>
|
|
+#include <posix/fcntl.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
diff --git a/lib/process.cpp b/lib/process.cpp
|
|
index 42056a9..0c6f7ad 100644
|
|
--- a/lib/process.cpp
|
|
+++ b/lib/process.cpp
|
|
@@ -609,7 +609,9 @@ private:
|
|
#include <errno.h>
|
|
#include <fcntl.h>
|
|
#include <signal.h>
|
|
+#ifndef __HAIKU__
|
|
#include <sys/syscall.h>
|
|
+#endif
|
|
#include <sys/wait.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From e2aca7f8c4b9e312ab74bd95377bd3bcd16e4e87 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sun, 20 Nov 2022 10:35:55 +0100
|
|
Subject: Haiku: use crypt() instead of crypt_r()
|
|
|
|
|
|
diff --git a/lib/impersonation.cpp b/lib/impersonation.cpp
|
|
index 2c5cb55..30764a6 100644
|
|
--- a/lib/impersonation.cpp
|
|
+++ b/lib/impersonation.cpp
|
|
@@ -8,7 +8,10 @@
|
|
#include <tuple>
|
|
|
|
#if FZ_UNIX
|
|
+#ifndef __HAIKU__
|
|
#include <crypt.h>
|
|
+#endif
|
|
+
|
|
#include <shadow.h>
|
|
#endif
|
|
#include <grp.h>
|
|
@@ -193,8 +196,13 @@ bool check_auth(native_string const& username, native_string const& password)
|
|
#if FZ_UNIX
|
|
auto shadow = get_shadow(username);
|
|
if (shadow.shadow_) {
|
|
+#ifdef __HAIKU__
|
|
+ //FIXME
|
|
+ char* encrypted = crypt(password.c_str(), shadow.shadow_->sp_pwdp);
|
|
+#else
|
|
struct crypt_data data{};
|
|
char* encrypted = crypt_r(password.c_str(), shadow.shadow_->sp_pwdp, &data);
|
|
+#endif
|
|
if (encrypted && !strcmp(encrypted, shadow.shadow_->sp_pwdp)) {
|
|
return true;
|
|
}
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 3ce4064bcc01f91c5aaa736f8545bd4c6f1919e2 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sun, 20 Nov 2022 10:35:55 +0100
|
|
Subject: configure: detect -lcrypt
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 6d5da67..bb9b6eb 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -117,6 +117,10 @@ CHECK_CLOCK_GETTIME
|
|
|
|
AC_CHECK_DECLS([pthread_condattr_setclock], [], [], [[#include <pthread.h>]])
|
|
|
|
+if test "$unix" = "1"; then
|
|
+ AC_SEARCH_LIBS([crypt], [crypt])
|
|
+fi
|
|
+
|
|
if test "$windows" = "1"; then
|
|
libdeps="-lws2_32 -liphlpapi"
|
|
else
|
|
diff --git a/lib/Makefile.am b/lib/Makefile.am
|
|
index f88c30a..f28c700 100644
|
|
--- a/lib/Makefile.am
|
|
+++ b/lib/Makefile.am
|
|
@@ -144,10 +144,6 @@ if FZ_MAC
|
|
libfilezilla_la_LDFLAGS += -framework CoreServices
|
|
endif
|
|
|
|
-if FZ_UNIX
|
|
-libfilezilla_la_LDFLAGS += -lcrypt
|
|
-endif
|
|
-
|
|
libfilezilla_la_CPPFLAGS = $(AM_CPPFLAGS)
|
|
libfilezilla_la_CPPFLAGS += -I$(top_builddir)/config
|
|
libfilezilla_la_CPPFLAGS += -DBUILDING_LIBFILEZILLA
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 74535abc7439dac0f8ad800b70a27f6d249a012d Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sun, 20 Nov 2022 10:35:55 +0100
|
|
Subject: configure: detect -lnetwork
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index bb9b6eb..fde02a5 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -121,6 +121,8 @@ if test "$unix" = "1"; then
|
|
AC_SEARCH_LIBS([crypt], [crypt])
|
|
fi
|
|
|
|
+AC_SEARCH_LIBS([socket], [network])
|
|
+
|
|
if test "$windows" = "1"; then
|
|
libdeps="-lws2_32 -liphlpapi"
|
|
else
|
|
--
|
|
2.37.3
|
|
|