diff --git a/ftp/wzdftpd/Makefile b/ftp/wzdftpd/Makefile index f62d71daed52..92e66fd04320 100644 --- a/ftp/wzdftpd/Makefile +++ b/ftp/wzdftpd/Makefile @@ -1,94 +1,81 @@ PORTNAME= wzdftpd PORTVERSION= 0.8.3 PORTREVISION= 8 CATEGORIES= ftp MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-sources/${PORTNAME}-${PORTVERSION:R} MAINTAINER= fuz@FreeBSD.org COMMENT= Modular FTP server configurable online using SITE commands WWW= https://sourceforge.net/projects/wzdftpd/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= autoreconf:2.69 cpe gettext-tools libtool localbase pkgconfig GNU_CONFIGURE= yes -CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --disable-bonjour --disable-static +CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --datadir=${PREFIX}/lib \ + --disable-bonjour --disable-static INSTALL_TARGET= install-strip USE_LDCONFIG= yes USE_RC_SUBR= wzdftpd OPTIONS_DEFINE= AVAHI DOCS ICONV IPV6 MYSQL PAM PERL PGSQL SQLITE TCL OPTIONS_RADIO= TLS OPTIONS_RADIO_TLS= GNUTLS OPENSSL OPTIONS_DEFAULT= AVAHI GNUTLS ICONV PAM PERL SQLITE OPTIONS_SUB= yes ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG} ICONV_CONFIGURE_OFF= --disable-utf8 ICONV_USES= iconv TCL_CONFIGURE_ON= --with-tcl=${TCL_LIBDIR} TCL_CONFIGURE_OFF= --without-tcl TCL_USES= tcl OPENSSL_CONFIGURE_ENABLE= openssl OPENSSL_USES= ssl GNUTLS_CONFIGURE_ENABLE= gnutls GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls IPV6_CONFIGURE_ENABLE= ipv6 PERL_CONFIGURE_ENABLE= perl PERL_USES= perl5 MYSQL_CONFIGURE_ENABLE= mysql MYSQL_USES= mysql PAM_CONFIGURE_WITH= pam PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE} PGSQL_CONFIGURE_OFF= --disable-pgsql PGSQL_USES= pgsql SQLITE_CONFIGURE_ENABLE= sqlite3 SQLITE_USES= sqlite:3 AVAHI_CONFIGURE_ON= --with-zeroconf --enable-avahi AVAHI_LIB_DEPENDS= libdbus-1.so:devel/dbus \ libavahi-core.so:net/avahi-app post-patch: @${TOUCH} ${WRKSRC}/config.rpath - @${ECHO_CMD} "ACLOCAL_AMFLAGS= -I ac-helpers" >> ${WRKSRC}/Makefile.am - @${REINPLACE_CMD} -e \ - '/LDFLAGS/s|@PTHREAD_CFLAGS@|@LTLIBICONV@|' \ - ${WRKSRC}/libwzd-core/Makefile.am - @${REINPLACE_CMD} -e \ - 's|INSTALLDIRS=vendor|INSTALLPRIVLIB=$${prefix}/lib| ; \ - /MAKE/s| install| pure_install|' \ - ${WRKSRC}/libwzd-perl/Makefile.am -.for i in backends modules - @${FIND} ${WRKSRC}/${i} -name "Makefile.am" | ${XARGS} \ - ${REINPLACE_CMD} -e \ - '/^libdir/s|$${pkgdatadir}|$${prefix}/lib/wzdftpd|' -.endfor - @${FIND} ${WRKSRC} -name "*_tls.c" | ${XARGS} ${REINPLACE_CMD} -e \ - '//d ; /gcry_control/d' - @${REINPLACE_CMD} -e \ - 's|^wzd_sfv_config SfvConfig|extern &|' \ - ${WRKSRC}/modules/sfv/libwzd_sfv_main.h +# wzd.m4 gets installed into the wrong spot due to our --datadir hack post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/share/aclocal + ${MV} ${STAGEDIR}${PREFIX}/lib/aclocal/wzd.m4 ${STAGEDIR}${PREFIX}/share/aclocal + ${RMDIR} ${STAGEDIR}${PREFIX}/lib/aclocal ${INSTALL_DATA} ${WRKSRC}/*.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in AUTHORS ChangeLog NEWS Permissions.ReadMeFirst README \ TLS.ReadMeFirst UPGRADING wzd_tls.cnf ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR} .endfor .include diff --git a/ftp/wzdftpd/files/patch-Makefile.am b/ftp/wzdftpd/files/patch-Makefile.am new file mode 100644 index 000000000000..f2a7a7e25eec --- /dev/null +++ b/ftp/wzdftpd/files/patch-Makefile.am @@ -0,0 +1,7 @@ +--- Makefile.am.orig 2023-02-11 10:33:06 UTC ++++ Makefile.am +@@ -20,3 +20,4 @@ doxy: + doxygen doxygen.cfg + + ++ACLOCAL_AMFLAGS= -I ac-helpers diff --git a/ftp/wzdftpd/files/patch-ac-helpers__tls.m4 b/ftp/wzdftpd/files/patch-ac-helpers__tls.m4 index 86f9dd704ec5..82113e8d212f 100644 --- a/ftp/wzdftpd/files/patch-ac-helpers__tls.m4 +++ b/ftp/wzdftpd/files/patch-ac-helpers__tls.m4 @@ -1,11 +1,11 @@ ---- ac-helpers/tls.m4.orig +--- ac-helpers/tls.m4.orig 2004-10-26 11:14:48 UTC +++ ac-helpers/tls.m4 -@@ -22,7 +22,7 @@ +@@ -22,7 +22,7 @@ AC_DEFUN([WZD_TLS], ) if test "$gnutls" = "yes"; then -AM_PATH_LIBGNUTLS(0.9.8,wzd_have_gnutls=yes) +PKG_CHECK_MODULES(LIBGNUTLS, [gnutls], [wzd_have_gnutls=yes], [wzd_have_gnutls=no]) fi # openssl is checked only if gnutls was not found or disabled diff --git a/ftp/wzdftpd/files/patch-libwzd-auth_wzd__md5.c b/ftp/wzdftpd/files/patch-libwzd-auth_wzd__md5.c new file mode 100644 index 000000000000..773535058d45 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-auth_wzd__md5.c @@ -0,0 +1,11 @@ +--- libwzd-auth/wzd_md5.c.orig 2023-02-11 10:36:30 UTC ++++ libwzd-auth/wzd_md5.c +@@ -158,7 +158,7 @@ void MD5Name(MD5Final)(unsigned char digest[16], struc + MD5Name(MD5Transform)(ctx->buf, (uint32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ explicit_bzero(ctx, sizeof *ctx); /* In case it's sensitive */ + } + + #ifndef ASM_MD5 diff --git a/ftp/wzdftpd/files/patch-libwzd-core_Makefile.am b/ftp/wzdftpd/files/patch-libwzd-core_Makefile.am new file mode 100644 index 000000000000..5b07a8331d15 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_Makefile.am @@ -0,0 +1,11 @@ +--- libwzd-core/Makefile.am.orig 2007-04-14 10:02:19 UTC ++++ libwzd-core/Makefile.am +@@ -101,7 +101,7 @@ libwzd_core_la_SOURCES = \ + + + libwzd_core_la_LIBADD = ../libwzd-base/libwzd_base.la ../libwzd-auth/libwzd_auth.la +-libwzd_core_la_LDFLAGS = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ -version-info $(LT_VERSION_INFO) -export-dynamic -no-undefined ++libwzd_core_la_LDFLAGS = @LTLIBICONV@ @PTHREAD_LIBS@ -version-info $(LT_VERSION_INFO) -export-dynamic -no-undefined + + AM_CPPFLAGS = -I$(top_srcdir) $(WZD_SSL_INCLUDES) -DWZD_MULTITHREAD -D_REENTRANT @PTHREAD_CFLAGS@ + diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__cookie__lex.l b/ftp/wzdftpd/files/patch-libwzd-core_wzd__cookie__lex.l new file mode 100644 index 000000000000..df3cb1193e1f --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__cookie__lex.l @@ -0,0 +1,11 @@ +--- libwzd-core/wzd_cookie_lex.l.orig 2023-02-11 11:26:34 UTC ++++ libwzd-core/wzd_cookie_lex.l +@@ -1731,7 +1731,7 @@ out_err(LEVEL_HIGH,"char: %d [%c]\n", c, c); + { + /* check FLAG_SITEOP for self */ + if (me && me->flags && strchr(me->flags,FLAG_SITEOP)) +- snprintf(internalbuffer,IBUFSIZE,"%lu",current_context->pid_child); ++ snprintf(internalbuffer,IBUFSIZE,"%lu",(unsigned long)current_context->pid_child); + else + snprintf(internalbuffer,IBUFSIZE,"some id"); + } diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__debug.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__debug.c new file mode 100644 index 000000000000..65d9c7ff7a7f --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__debug.c @@ -0,0 +1,11 @@ +--- libwzd-core/wzd_debug.c.orig 2023-02-11 11:21:12 UTC ++++ libwzd-core/wzd_debug.c +@@ -318,7 +318,7 @@ int check_context(wzd_context_t * context) + out_err(LEVEL_CRITICAL,"CRITICAL context %p\n",context); + return 1; + } +- if (!context->magic == CONTEXT_MAGIC) ++ if (context->magic != CONTEXT_MAGIC) + { + out_err(LEVEL_CRITICAL,"CRITICAL context->magic is invalid, context may be corrupted\n"); + return 1; diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__libmain.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__libmain.c new file mode 100644 index 000000000000..75aceb496a28 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__libmain.c @@ -0,0 +1,10 @@ +--- libwzd-core/wzd_libmain.c.orig 2023-02-11 10:43:55 UTC ++++ libwzd-core/wzd_libmain.c +@@ -285,7 +285,6 @@ void context_init(wzd_context_t * context) + context->datafd = -1; + context->pasvsock = -1; + context->userid = (unsigned int)-1; +- context->thread_id = (unsigned long)-1; + context->state = STATE_UNKNOWN; + context->datamode = DATA_PORT; + context->current_action.current_file = -1; diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__list.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__list.c new file mode 100644 index 000000000000..f92ddcfd6199 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__list.c @@ -0,0 +1,11 @@ +--- libwzd-core/wzd_list.c.orig 2023-02-11 11:22:20 UTC ++++ libwzd-core/wzd_list.c +@@ -277,7 +277,7 @@ char * mlst_single_file(const char *filename, wzd_cont + + ptr = strrchr(filename,'/'); + if (!ptr) return NULL; +- if (ptr+1 != '\0') ptr++; ++ if (ptr[1] != '\0') ptr++; + + /** \bug this kills VFS */ + /* if (fs_file_lstat(filename,&s)) return -1;*/ diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.c new file mode 100644 index 000000000000..ed386b049674 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.c @@ -0,0 +1,20 @@ +--- libwzd-core/wzd_misc.c.orig 2023-02-11 11:23:37 UTC ++++ libwzd-core/wzd_misc.c +@@ -990,7 +990,7 @@ void win_normalize(char * s, unsigned int length, unsi + + + /* \return 0 if ok, -1 if error, 1 if trying to kill myself */ +-int kill_child_signal(unsigned long pid, wzd_context_t * context) ++int kill_child_signal(pthread_t pid, wzd_context_t * context) + { + ListElmt * elmnt; + wzd_context_t * loop_context; +@@ -1022,7 +1022,7 @@ int kill_child_signal(unsigned long pid, wzd_context_t + } + + /* \return 0 if ok, -1 if error, 1 if trying to kill myself */ +-int kill_child_new(unsigned long pid, wzd_context_t * context) ++int kill_child_new(pthread_t pid, wzd_context_t * context) + { + ListElmt * elmnt; + int found=0; diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.h b/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.h new file mode 100644 index 000000000000..d2e57f88cb9d --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__misc.h @@ -0,0 +1,20 @@ +--- libwzd-core/wzd_misc.h.orig 2023-02-11 11:24:33 UTC ++++ libwzd-core/wzd_misc.h +@@ -52,7 +52,7 @@ int split_filename(const char *filename, char *path, c + * If the client is inside a function, it is stopped immediatly, + * maybe creating some problems. + */ +-int kill_child_signal(unsigned long pid, wzd_context_t * context); ++int kill_child_signal(pthread_t pid, wzd_context_t * context); + + /** \brief Kill child + * +@@ -61,7 +61,7 @@ int kill_child_signal(unsigned long pid, wzd_context_t + * If the client is inside a function, it will exit after the function + * is finished. + */ +-int kill_child_new(unsigned long pid, wzd_context_t * context); ++int kill_child_new(pthread_t pid, wzd_context_t * context); + + /* returns system ip on specifed interface (e.g eth0) */ + int get_system_ip(const char * itface, struct in_addr * ina); diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__site__user.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__site__user.c new file mode 100644 index 000000000000..0002c910cb1c --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__site__user.c @@ -0,0 +1,14 @@ +--- libwzd-core/wzd_site_user.c.orig 2023-02-11 11:29:18 UTC ++++ libwzd-core/wzd_site_user.c +@@ -1224,9 +1224,9 @@ int do_site_kill(UNUSED wzd_string_t *ignored, wzd_str + { + char *ptr; + int ret; +- unsigned long pid; ++ pthread_t pid; + +- pid = strtoul(str_tochar(param),&ptr,0); ++ pid = (pthread_t)strtoul(str_tochar(param),&ptr,0); + if (*ptr!='\0') { + ret = send_message_with_args(501,context,"Usage: site kill "); + return 0; diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__structs.h b/ftp/wzdftpd/files/patch-libwzd-core_wzd__structs.h new file mode 100644 index 000000000000..b5e6090d8d64 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__structs.h @@ -0,0 +1,13 @@ +--- libwzd-core/wzd_structs.h.orig 2007-05-17 09:54:38 UTC ++++ libwzd-core/wzd_structs.h +@@ -366,8 +366,8 @@ struct wzd_context_t { + data_mode_t datamode; + tls_data_mode_t tls_data_mode; + net_family_t datafamily; /**< \brief IPv4 or IPv6 */ +- unsigned long pid_child; +- unsigned long thread_id; ++ pthread_t pid_child; ++ pthread_t thread_id; + + union wzd_thread_t * transfer_thread; + u8_t is_transferring; diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c similarity index 77% rename from ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c rename to ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c index c474a2fecf96..ef82b2db639b 100644 --- a/ftp/wzdftpd/files/patch-libwzd-core_wzd_tls.c +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c @@ -1,61 +1,77 @@ --- libwzd-core/wzd_tls.c.orig 2007-10-25 17:25:33 UTC +++ libwzd-core/wzd_tls.c @@ -297,7 +297,7 @@ int tls_init(void) return 1; } - SSL_CTX_set_client_CA_list(tls_ctx, (STACK *)ca_list); + SSL_CTX_set_client_CA_list(tls_ctx, ca_list); } SSL_CTX_set_session_cache_mode(tls_ctx, SSL_SESS_CACHE_CLIENT); -@@ -946,19 +946,13 @@ int tls_exit(void) +@@ -779,7 +779,6 @@ void * ssl_get_obj(wzd_context_t * context) + #include + + #include +-#include + #include + #include + GCRY_THREAD_OPTION_PTHREAD_IMPL; +@@ -892,7 +891,6 @@ int tls_init(void) + + /* The order matters. + */ +- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); + gnutls_global_init(); + + /** \todo TODO XXX move this code to global init ? */ +@@ -946,19 +944,13 @@ int tls_exit(void) static gnutls_session initialize_tls_session(gnutls_connection_end con_end) { - /* Allow connections to servers that have OpenPGP keys as well. - */ - const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; - gnutls_session session; gnutls_init(&session, con_end); - /* avoid calling all the priority functions, since the defaults - * are adequate. + /* Allow connections to servers that have OpenPGP keys as well. */ - gnutls_set_default_priority(session); - gnutls_certificate_type_set_priority(session, cert_type_priority); + gnutls_priority_set_direct(session, "NORMAL:+CTYPE-OPENPGP", NULL); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred); -@@ -1001,27 +995,6 @@ int tls_auth (const char *type, wzd_context_t * contex +@@ -1001,27 +993,6 @@ int tls_auth (const char *type, wzd_context_t * contex } /** \todo XXX parse TLS cipher names */ - { - /** Note that the priority is set on the client. The server does not use - * the algorithm's priority except for disabling algorithms that were not - * specified. - */ - const int cipherPriority[] = - { - GNUTLS_CIPHER_ARCFOUR_128, - GNUTLS_CIPHER_3DES_CBC, - GNUTLS_CIPHER_AES_128_CBC, - GNUTLS_CIPHER_AES_256_CBC, - GNUTLS_CIPHER_ARCFOUR_40, -#if ( (LIBGNUTLS_VERSION_MAJOR > 1) || (LIBGNUTLS_VERSION_MINOR >= 3) ) - GNUTLS_CIPHER_RC2_40_CBC, - GNUTLS_CIPHER_DES_CBC, -#endif - 0 - }; - - gnutls_cipher_set_priority(session, cipherPriority); - } /* ensure socket is non-blocking */ #if defined(_MSC_VER) || (defined(__CYGWIN__) && defined(WINSOCK_SUPPORT)) diff --git a/ftp/wzdftpd/files/patch-libwzd-perl_Makefile.am b/ftp/wzdftpd/files/patch-libwzd-perl_Makefile.am new file mode 100644 index 000000000000..488f712c251d --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-perl_Makefile.am @@ -0,0 +1,19 @@ +--- libwzd-perl/Makefile.am.orig 2006-06-13 07:34:54 UTC ++++ libwzd-perl/Makefile.am +@@ -7,14 +7,14 @@ ext: ext/Makefile ext/wzdftpd.pm ../libwzd/libwzd.la + cd ext && $(MAKE) LD_RUN_PATH="" + + ext/Makefile: ext/Makefile.PL ext/wzdftpd.pm ext/wzdftpd.xs +- cd ext && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) INSTALLDIRS=vendor ++ cd ext && $(PERL) Makefile.PL $(PERLFLAGS) $(PERL_MAKE_OPTIONS) INSTALLPRIVLIB=${prefix}/lib + + + all-local: ext + + install-data-local: all-local + echo "Installing wzdftpd.pm"; \ +- cd ext && $(MAKE) install ++ cd ext && $(MAKE) pure_install + + clean-local: + cd ext && test -f Makefile && $(MAKE) clean || true \ diff --git a/ftp/wzdftpd/files/patch-libwzd_libwzd__tls.c b/ftp/wzdftpd/files/patch-libwzd_libwzd__tls.c new file mode 100644 index 000000000000..5eb361999071 --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd_libwzd__tls.c @@ -0,0 +1,10 @@ +--- libwzd/libwzd_tls.c.orig 2006-09-19 13:28:28 UTC ++++ libwzd/libwzd_tls.c +@@ -153,7 +153,6 @@ int tls_write(const char *buffer, int length) + #elif HAVE_GNUTLS + + #include +-#include + + #define DH_BITS 1024 + diff --git a/ftp/wzdftpd/files/patch-modules_sfv_libwzd__sfv__main.h b/ftp/wzdftpd/files/patch-modules_sfv_libwzd__sfv__main.h new file mode 100644 index 000000000000..6024a6e19c8b --- /dev/null +++ b/ftp/wzdftpd/files/patch-modules_sfv_libwzd__sfv__main.h @@ -0,0 +1,11 @@ +--- modules/sfv/libwzd_sfv_main.h.orig 2006-05-29 16:45:55 UTC ++++ modules/sfv/libwzd_sfv_main.h +@@ -15,7 +15,7 @@ typedef struct { + double size_total; + } wzd_release_stats; + +-wzd_sfv_config SfvConfig; /*Our main SFV config */ ++extern wzd_sfv_config SfvConfig; /*Our main SFV config */ + char * create_filepath(const char *dir, const char * file); + + diff --git a/ftp/wzdftpd/files/patch-wzdftpd_wzd__ServerThread.c b/ftp/wzdftpd/files/patch-wzdftpd_wzd__ServerThread.c new file mode 100644 index 000000000000..006eef86654c --- /dev/null +++ b/ftp/wzdftpd/files/patch-wzdftpd_wzd__ServerThread.c @@ -0,0 +1,25 @@ +--- wzdftpd/wzd_ServerThread.c.orig 2023-02-11 11:33:03 UTC ++++ wzdftpd/wzd_ServerThread.c +@@ -934,7 +934,7 @@ static void server_login_accept(wzd_context_t * contex + out_err(LEVEL_CRITICAL,"Unable to create thread\n"); + return; + } +- context->pid_child = (unsigned long)WZD_THREAD_VOID(&thread); ++ context->pid_child = (pthread_t)WZD_THREAD_VOID(&thread); + wzd_thread_attr_destroy(&thread_attr); /* not needed anymore */ + } + +@@ -1624,10 +1624,12 @@ void serverMainThreadCleanup(int retcode) + { + ListElmt * elmnt; + wzd_context_t * loop_context; ++ wzd_thread_t child; + for (elmnt=list_head(context_list); elmnt!=NULL; elmnt=list_next(elmnt)) + { + if ((loop_context = list_data(elmnt))) { +- wzd_thread_cancel(loop_context->pid_child); ++ child._t = loop_context->pid_child; ++ wzd_thread_cancel(&child); + #ifdef WIN32 + /** \todo remove this when wzd_thread_cancel is implemented on windows */ + loop_context->exitclient = 1; diff --git a/ftp/wzdftpd/files/patch-wzdftpd_wzd__opts.h b/ftp/wzdftpd/files/patch-wzdftpd_wzd__opts.h new file mode 100644 index 000000000000..b1d9c4845749 --- /dev/null +++ b/ftp/wzdftpd/files/patch-wzdftpd_wzd__opts.h @@ -0,0 +1,14 @@ +--- wzdftpd/wzd_opts.h.orig 2023-02-11 11:32:00 UTC ++++ wzdftpd/wzd_opts.h +@@ -24,11 +24,7 @@ struct option + #define optional_argument 2 + + #if __STDC__ +-#if defined(__GNU_LIBRARY__) + extern int getopt (int argc, char *const *argv, const char *shortopts); +-#else /* not __GNU_LIBRARY__ */ +-extern int getopt (); +-#endif /* not __GNU_LIBRARY__ */ + extern int getopt_long (int argc, char *const *argv, const char + *shortopts, const struct option *longopts, int + *longind); extern int getopt_long_only (int argc, char *const *argv,