[PATCH] Re: [mythtv] autoexpire.cpp doesn't compile (in FreeBSD)
Ari Suutari
ari at suutari.iki.fi
Wed Jun 22 05:44:40 UTC 2005
Hi,
Daniel Kristjansson wrote:
> Can you make a patch that works on FreeBSD?
Here it is (attached).
Ari S.
-------------- next part --------------
Index: autoexpire.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/autoexpire.cpp,v
retrieving revision 1.24
diff -c -r1.24 autoexpire.cpp
*** autoexpire.cpp 24 May 2005 20:19:55 -0000 1.24
--- autoexpire.cpp 22 Jun 2005 05:40:43 -0000
***************
*** 54,65 ****
desired_freq(10), expire_thread_running(runthread),
is_master_backend(master), disable_expire(true), update_pending(false)
{
- expire_thread = PTHREAD_CREATE_JOINABLE;
- update_thread = PTHREAD_CREATE_DETACHED;
-
if (runthread)
{
! pthread_create(&expire_thread, NULL, ExpirerThread, this);
gContext->addListener(this);
}
}
--- 54,66 ----
desired_freq(10), expire_thread_running(runthread),
is_master_backend(master), disable_expire(true), update_pending(false)
{
if (runthread)
{
! pthread_attr_t attr;
! pthread_attr_init(&attr);
! pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
!
! pthread_create(&expire_thread, &attr, ExpirerThread, this);
gContext->addListener(this);
}
}
***************
*** 633,640 ****
else
{
// create thread to do work
! expirer->update_thread = PTHREAD_CREATE_DETACHED;
! pthread_create(&expirer->update_thread, NULL,
SpawnUpdateThread, expirer);
}
}
--- 634,644 ----
else
{
// create thread to do work
! pthread_attr_t attr;
! pthread_attr_init(&attr);
! pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
!
! pthread_create(&expirer->update_thread, &attr,
SpawnUpdateThread, expirer);
}
}
More information about the mythtv-dev
mailing list