summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-03-06 11:20:36 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-03-06 11:20:36 +0000
commit52ac1ab34c257731efa237191ea765029d7fc8b5 (patch)
tree22972a2dd32818aa61dd414f064b517f113ee990 /net.c
parent697efa964e697594a6df469c6958900136fc6881 (diff)
downloadrsyslog-52ac1ab34c257731efa237191ea765029d7fc8b5.tar.gz
rsyslog-52ac1ab34c257731efa237191ea765029d7fc8b5.tar.xz
rsyslog-52ac1ab34c257731efa237191ea765029d7fc8b5.zip
worked some more on HP UX - got it to compile and receive UDP messages
Diffstat (limited to 'net.c')
-rw-r--r--net.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net.c b/net.c
index 103d975c..f7769f13 100644
--- a/net.c
+++ b/net.c
@@ -729,7 +729,13 @@ void debugListenInfo(int fd, char *type)
struct sockaddr sa;
struct sockaddr_in *ipv4;
struct sockaddr_in6 *ipv6;
- socklen_t saLen = sizeof(sa);
+/* 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);
if(getsockname(fd, &sa, &saLen) == 0) {
switch(sa.sa_family) {
@@ -948,7 +954,7 @@ int *create_udp_socket(uchar *hostname, uchar *pszPort, int bIsServer)
/* We need to enable BSD compatibility. Otherwise an attacker
* could flood our log files by sending us tons of ICMP errors.
*/
-#ifndef BSD
+#if !defined(BSD) && !defined(__hpux)
if (should_use_so_bsdcompat()) {
if (setsockopt(*s, SOL_SOCKET, SO_BSDCOMPAT,
(char *) &on, sizeof(on)) < 0) {