summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-16 12:56:01 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-16 12:56:01 +0200
commit214e5ec7c068efaa250d106d279d50ad07a85006 (patch)
tree28a27922b1db236778b779ddcbd2e7fbfab0a607
parent8f06095880c73adb5147b348a4bac428d4863169 (diff)
parent191c51187ee54201954e5c73492a8bd5902044c7 (diff)
downloadrsyslog-214e5ec7c068efaa250d106d279d50ad07a85006.tar.gz
rsyslog-214e5ec7c068efaa250d106d279d50ad07a85006.tar.xz
rsyslog-214e5ec7c068efaa250d106d279d50ad07a85006.zip
Merge branch 'v4-beta' into v4-devel
-rw-r--r--configure.ac4
-rw-r--r--runtime/wtp.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index dc1aab3a..8709c25a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ AC_SUBST(DL_LIBS)
AC_HEADER_RESOLV
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h libgen.h fcntl.h locale.h netdb.h netinet/in.h paths.h stddef.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/stat.h syslog.h unistd.h utmp.h sys/epoll.h])
+AC_CHECK_HEADERS([arpa/inet.h libgen.h fcntl.h locale.h netdb.h netinet/in.h paths.h stddef.h stdlib.h string.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/stat.h syslog.h unistd.h utmp.h sys/epoll.h sys/prctl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -98,7 +98,7 @@ AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([flock basename alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r epoll_wait getline malloc_trim])
+AC_CHECK_FUNCS([flock basename alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r epoll_wait getline malloc_trim prctl])
# Check for MAXHOSTNAMELEN
AC_MSG_CHECKING(for MAXHOSTNAMELEN)
diff --git a/runtime/wtp.c b/runtime/wtp.c
index ba1f94b3..596ff866 100644
--- a/runtime/wtp.c
+++ b/runtime/wtp.c
@@ -40,11 +40,12 @@
#include <unistd.h>
#include <errno.h>
#include <atomic.h>
-#include <sys/prctl.h>
+#if HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
#ifdef OS_SOLARIS
# include <sched.h>
-# define pthread_yield() sched_yield()
#endif
#include "rsyslog.h"
@@ -437,12 +438,14 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in
sigfillset(&sigSet);
pthread_sigmask(SIG_BLOCK, &sigSet, NULL);
+# if HAVE_PRCTL && defined PR_SET_NAME
/* set thread name - we ignore if the call fails, has no harsh consequences... */
pszDbgHdr = wtpGetDbgHdr(pThis);
ustrncpy(thrdName+3, pszDbgHdr, 20);
if(prctl(PR_SET_NAME, thrdName, 0, 0, 0) != 0) {
DBGPRINTF("prctl failed, not setting thread name for '%s'\n", wtpGetDbgHdr(pThis));
}
+# endif
BEGIN_MTX_PROTECTED_OPERATIONS(&pThis->mut, LOCK_MUTEX);