mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-23 09:10:43 +00:00
2f04ed793d
Seems like the compiler got a whole lot stricter with this release. The biggest fix was changing the thread ID from unsigned long to pthread_t, which will probably break compilation on Win32. While we are at it, replace static uses of REINPLACE_CMD with patch files as per policy. This change is responsible for most of the newly added patches. The wzdftpd build scripts want to install plugins into ${PREFIX}/share when they belong into ${PREFIX}/lib. Instead of patching this in each Makefile.am, set --datadir=${PREFIX}/lib and work around the one file for which this is wrong. Approved by: eduardo (mentor) Differential Revision: https://reviews.freebsd.org/D38523
26 lines
997 B
C
26 lines
997 B
C
--- 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;
|