aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2023-06-26 15:16:17 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-06-26 23:30:29 +0000
commit0ef9bba398930d4f8cd4b512188b5b8f3e8d4527 (patch)
tree7fe5a6a20301569a4ce18998e3c95b7e8727b55f
parent95f93a2eea17325f25b60138a0b50b6c260cec38 (diff)
downloadports-0ef9bba398930d4f8cd4b512188b5b8f3e8d4527.tar.gz
ports-0ef9bba398930d4f8cd4b512188b5b8f3e8d4527.zip
ftp/wzdftpd: fix build with LLVM 16
Also fix staging violation. Reported by: fallout
-rw-r--r--ftp/wzdftpd/Makefile2
-rw-r--r--ftp/wzdftpd/files/patch-backends_pam_libpam__main.c10
-rw-r--r--ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c20
-rw-r--r--ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c10
-rw-r--r--ftp/wzdftpd/files/patch-wzdftpd_Makefile.am13
5 files changed, 52 insertions, 3 deletions
diff --git a/ftp/wzdftpd/Makefile b/ftp/wzdftpd/Makefile
index 92e66fd04320..e4333430f59b 100644
--- a/ftp/wzdftpd/Makefile
+++ b/ftp/wzdftpd/Makefile
@@ -1,6 +1,6 @@
PORTNAME= wzdftpd
PORTVERSION= 0.8.3
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= ftp
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-sources/${PORTNAME}-${PORTVERSION:R}
diff --git a/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c b/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c
new file mode 100644
index 000000000000..361ceb1e3b49
--- /dev/null
+++ b/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c
@@ -0,0 +1,10 @@
+--- backends/pam/libpam_main.c.orig 2023-06-26 15:12:29 UTC
++++ backends/pam/libpam_main.c
+@@ -47,6 +47,7 @@
+ #include <pwd.h>
+ #include <grp.h>
+ #include <errno.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+
+ #include <libwzd-core/wzd_backend.h>
diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c
new file mode 100644
index 000000000000..879c3ed9799b
--- /dev/null
+++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c
@@ -0,0 +1,20 @@
+--- libwzd-core/wzd_data.c.orig 2023-06-26 15:01:55 UTC
++++ libwzd-core/wzd_data.c
+@@ -529,7 +529,7 @@ int data_start_thread_retr(wzd_context_t * context)
+ int ret;
+
+ thread = malloc(sizeof(wzd_thread_t));
+- ret = wzd_thread_create(thread, NULL, do_local_retr, context);
++ ret = wzd_thread_create(thread, NULL, (void *(*)(void *))do_local_retr, context);
+
+ context->transfer_thread = thread;
+
+@@ -544,7 +544,7 @@ int data_start_thread_stor(wzd_context_t * context)
+ int ret;
+
+ thread = malloc(sizeof(wzd_thread_t));
+- ret = wzd_thread_create(thread, NULL, do_local_stor, context);
++ ret = wzd_thread_create(thread, NULL, (void *(*)(void *))do_local_stor, context);
+
+ context->transfer_thread = thread;
+
diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c
index ef82b2db639b..83ef3b62b204 100644
--- a/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c
+++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c
@@ -9,14 +9,20 @@
}
SSL_CTX_set_session_cache_mode(tls_ctx, SSL_SESS_CACHE_CLIENT);
-@@ -779,7 +779,6 @@ void * ssl_get_obj(wzd_context_t * context)
+@@ -777,12 +777,11 @@ void * ssl_get_obj(wzd_context_t * context)
+
+ #include <stdlib.h>
#include <stdio.h>
++#include <string.h>
#include <gnutls/gnutls.h>
-#include <gcrypt.h>
#include <errno.h>
#include <pthread.h>
- GCRY_THREAD_OPTION_PTHREAD_IMPL;
+-GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
+ #include <fcntl.h>
+
@@ -892,7 +891,6 @@ int tls_init(void)
/* The order matters.
diff --git a/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am b/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am
new file mode 100644
index 000000000000..33ce38c3c874
--- /dev/null
+++ b/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am
@@ -0,0 +1,13 @@
+--- wzdftpd/Makefile.am.orig 2023-06-26 15:25:11 UTC
++++ wzdftpd/Makefile.am
+@@ -22,10 +22,8 @@ dist_sysconf_DATA = wzd.cfg.sample wzd.pem \
+ users.sample
+
+ install-data-hook:
+- ${INSTALL_PROGRAM} -m 775 -d $(localstatedir)/log/wzdftpd || true
+
+ uninstall-hook:
+- rmdir --ignore-fail-on-non-empty $(localstatedir)/log/wzdftpd || true
+
+ EXTRA_DIST = KNOWN_BUGS TODO wzd.cfg.sample.in
+