mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 05:40:07 +02:00
143 lines
3.5 KiB
Plaintext
143 lines
3.5 KiB
Plaintext
From 437e8221404f7e8153769f191b96baa0ada544ab 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 b15ce7c..3a13feb 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 f3e7cfc88429e9af5dafc5688e2cf5a539285ab4 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..4dd5f25 100644
|
|
--- a/lib/impersonation.cpp
|
|
+++ b/lib/impersonation.cpp
|
|
@@ -193,8 +193,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 aa02bc63254d88f1191cffbde2d9ed6a020483ab 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 crypt.h and -lcrypt
|
|
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 3546967..6d84301 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -117,6 +117,11 @@ CHECK_CLOCK_GETTIME
|
|
|
|
AC_CHECK_DECLS([pthread_condattr_setclock], [], [], [[#include <pthread.h>]])
|
|
|
|
+if test "$unix" = "1"; then
|
|
+ AC_CHECK_HEADERS([crypt.h])
|
|
+ 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 492b26c..8d7dae0 100644
|
|
--- a/lib/Makefile.am
|
|
+++ b/lib/Makefile.am
|
|
@@ -160,10 +160,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
|
|
diff --git a/lib/impersonation.cpp b/lib/impersonation.cpp
|
|
index 4dd5f25..ce18547 100644
|
|
--- a/lib/impersonation.cpp
|
|
+++ b/lib/impersonation.cpp
|
|
@@ -8,7 +8,9 @@
|
|
#include <tuple>
|
|
|
|
#if FZ_UNIX
|
|
+#ifdef HAVE_CRYPT_H
|
|
#include <crypt.h>
|
|
+#endif
|
|
#include <shadow.h>
|
|
#endif
|
|
#include <grp.h>
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 211bc87356d728f661c0c9be5683bc1a6044afa5 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 6d84301..c07f18e 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -122,6 +122,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
|
|
|