1*4882a593SmuzhiyunFrom 435b28cd90973cc03a533e75e90a46cd9f197dff Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Peter Korsgaard <peter@korsgaard.com> 3*4882a593SmuzhiyunDate: Sat, 25 Oct 2014 19:44:01 +0200 4*4882a593SmuzhiyunSubject: [PATCH 2/5] Fix linking error without pthread 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThe rollingfile functionality only gets built if pthread support is 7*4882a593Smuzhiyunavailable, but a call to these functions from log4c_fini() was outside 8*4882a593Smuzhiyunthe #if WITH_ROLLINGFILE conditional, causing linker errors when the 9*4882a593Smuzhiyunlibrary is used. 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunSubmitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunSigned-off-by: Peter Korsgaard <peter@korsgaard.com> 14*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 15*4882a593Smuzhiyun--- 16*4882a593Smuzhiyun src/log4c/init.c | 2 ++ 17*4882a593Smuzhiyun 1 file changed, 2 insertions(+) 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundiff --git a/src/log4c/init.c b/src/log4c/init.c 20*4882a593Smuzhiyunindex 99883ea..7dd9eb4 100644 21*4882a593Smuzhiyun--- a/src/log4c/init.c 22*4882a593Smuzhiyun+++ b/src/log4c/init.c 23*4882a593Smuzhiyun@@ -267,10 +267,12 @@ extern int log4c_fini(void) 24*4882a593Smuzhiyun log4c_layout_factory = NULL; 25*4882a593Smuzhiyun } 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun+#ifdef WITH_ROLLINGFILE 28*4882a593Smuzhiyun if (log4c_rollingpolicy_factory) { 29*4882a593Smuzhiyun sd_factory_delete(log4c_rollingpolicy_factory); 30*4882a593Smuzhiyun log4c_rollingpolicy_factory = NULL; 31*4882a593Smuzhiyun } 32*4882a593Smuzhiyun+#endif 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #ifdef __SD_DEBUG__ 35*4882a593Smuzhiyun if( getenv("SD_DEBUG")){ 36*4882a593Smuzhiyun-- 37*4882a593Smuzhiyun2.0.0 38*4882a593Smuzhiyun 39