summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net.c8
-rw-r--r--plugins/imklog/imklog.c14
-rw-r--r--rsyslog.h1
3 files changed, 12 insertions, 11 deletions
diff --git a/net.c b/net.c
index f7769f13..b7be521a 100644
--- a/net.c
+++ b/net.c
@@ -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
diff --git a/rsyslog.h b/rsyslog.h
index 52a56972..de97e1b8 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -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