diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-06 17:39:09 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-06 17:39:09 +0000 |
commit | ae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664 (patch) | |
tree | ef3d6dbbb8fe7268cd2a922a5de3e17f0814fc1e | |
parent | 9c0d5b9e4b119e6034a60a69def51c0621c3a299 (diff) | |
download | rsyslog-ae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664.tar.gz rsyslog-ae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664.tar.xz rsyslog-ae3e3e9cb1584b5cf7082c1b28c4cbbd48b1f664.zip |
some minor things in regard to portability
-rw-r--r-- | net.c | 8 | ||||
-rw-r--r-- | plugins/imklog/imklog.c | 14 | ||||
-rw-r--r-- | rsyslog.h | 1 |
3 files changed, 12 insertions, 11 deletions
@@ -729,13 +729,7 @@ void debugListenInfo(int fd, char *type) struct sockaddr sa; struct sockaddr_in *ipv4; struct sockaddr_in6 *ipv6; -/* TODO: do this below better -- autotools? */ -#if defined(__hpux) -# define SOCKLEN_T int -#else -# define SOCKLEN_T socklen_t -#endif - SOCKLEN_T saLen = sizeof(sa); + socklen_t saLen = sizeof(sa); if(getsockname(fd, &sa, &saLen) == 0) { switch(sa.sa_family) { diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 46c78e70..2731e08d 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -67,15 +67,19 @@ static int console_log_level = -1; #include <errno.h> #include <sys/fcntl.h> #include <sys/stat.h> -#if !defined(__GLIBC__) -#include <linux/time.h> -#endif /* __GLIBC__ */ + +#if HAVE_TIME_H +# include <time.h> +#endif + #include <stdarg.h> #include <paths.h> #include "ksyms.h" #define __LIBRARY__ -#include <linux/unistd.h> +#include <unistd.h> + + #if !defined(__GLIBC__) # define __NR_ksyslog __NR_syslog _syscall3(int,ksyslog,int, type, char *, buf, int, len); @@ -84,6 +88,8 @@ _syscall3(int,ksyslog,int, type, char *, buf, int, len); #define ksyslog klogctl #endif + + #ifndef _PATH_KLOG #define _PATH_KLOG "/proc/kmsg" #endif @@ -51,6 +51,7 @@ typedef int64 number_t; /* type to use for numbers - TODO: maybe an autoconf opt #ifdef __hpux typedef unsigned int u_int32_t; /* TODO: is this correct? */ +typedef int socklen_t; #endif /* The error codes below are orginally "borrowed" from |