Skip to content

Commit

Permalink
ftp/wzdftpd: fix build with LLVM 16
Browse files Browse the repository at this point in the history
Also fix staging violation.

Reported by:	fallout
  • Loading branch information
clausecker committed Jun 26, 2023
1 parent 95f93a2 commit 0ef9bba
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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}

Expand Down
10 changes: 10 additions & 0 deletions 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>
20 changes: 20 additions & 0 deletions 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;

10 changes: 8 additions & 2 deletions ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c
Expand Up @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions 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

0 comments on commit 0ef9bba

Please sign in to comment.