diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-09-14 15:45:13 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-09-14 15:45:13 +0200 |
commit | e84edbdba5eff2460e9349ab131090a785aa190b (patch) | |
tree | 31462250c44eaa996ae1dcdfb2f6e9d2569f826d | |
parent | 6fdd4aee769f3a1b6eb5687f5857bf148f06ed7a (diff) | |
parent | 78469b4c6a82887c70e2cac365af7a66051f8ba7 (diff) | |
download | rsyslog-e84edbdba5eff2460e9349ab131090a785aa190b.tar.gz rsyslog-e84edbdba5eff2460e9349ab131090a785aa190b.tar.xz rsyslog-e84edbdba5eff2460e9349ab131090a785aa190b.zip |
Merge branch 'v4-devel' into master
Conflicts:
configure.ac
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | runtime/msg.c | 4 | ||||
-rw-r--r-- | runtime/stream.c | 10 |
4 files changed, 14 insertions, 5 deletions
@@ -155,6 +155,7 @@ Version 4.5.3 [v4-beta] (rgerhards), 2009-08-?? - bugfix: strings improperly reused, resulting in some message properties be populated with strings from previous messages. This was caused by an improper predicate check. [backported from v5] +- fixed some minor portability issues - bugfix: reverse lookup reduction logic in imudp do DNS queries too often [imported from 4.4.2] --------------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 9d1f7593..3250ef2f 100644 --- a/configure.ac +++ b/configure.ac @@ -72,7 +72,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 sys/prctl.h]) +AC_CHECK_HEADERS([arpa/inet.h libgen.h malloc.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 @@ -107,7 +107,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 getline malloc_trim prctl epoll_create1]) +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 getline malloc_trim prctl epoll_create1 fdatasync]) # Check for MAXHOSTNAMELEN AC_MSG_CHECKING(for MAXHOSTNAMELEN) diff --git a/runtime/msg.c b/runtime/msg.c index 8beb9c32..5a33837f 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -35,7 +35,9 @@ #include <string.h> #include <assert.h> #include <ctype.h> -#include <malloc.h> +#if HAVE_MALLOC_H +# include <malloc.h> +#endif #include "rsyslog.h" #include "srUtils.h" #include "stringbuf.h" diff --git a/runtime/stream.c b/runtime/stream.c index b1abb27e..2bc2fba2 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -960,6 +960,12 @@ finalize_it: * is worth (read: data loss may occur where we otherwise might not * have it). -- rgerhards, 2009-06-08 */ +#undef SYNCCALL +#if HAVE_FDATASYNC +# define SYNCCALL(x) fdatasync(x) +#else +# define SYNCCALL(x) fsync(x) +#endif static rsRetVal syncFile(strm_t *pThis) { @@ -970,7 +976,7 @@ syncFile(strm_t *pThis) FINALIZE; /* TTYs can not be synced */ DBGPRINTF("syncing file %d\n", pThis->fd); - ret = fdatasync(pThis->fd); + ret = SYNCCALL(pThis->fd); if(ret != 0) { char errStr[1024]; int err = errno; @@ -986,7 +992,7 @@ syncFile(strm_t *pThis) finalize_it: RETiRet; } - +#undef SYNCCALL /* physically write to the output file. the provided data is ready for * writing (e.g. zipped if we are requested to do that). |