mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-15 16:20:08 +02:00
139 lines
3.3 KiB
Plaintext
139 lines
3.3 KiB
Plaintext
From 57a1af2ab16edfdf046e5cd0d4d64828166bcf56 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 64c55770b148c9d60cbacd02a8de3111cd6293e7 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 4764b37a902835c4fe2909d67a67f99425daa7d7 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 ece1b13..1b4d469 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 e1c4095d8477d42abc82ebe5a7c33caf37fec023 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 1b4d469..e11a12e 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
|
|
|