worked some more on HP UX - got it to compile and receive UDP messages

This commit is contained in:
Rainer Gerhards 2008-03-06 11:20:36 +00:00
parent 697efa964e
commit 52ac1ab34c
3 changed files with 9 additions and 4 deletions

View File

@ -796,9 +796,9 @@ finalize_it:
rsRetVal regCfSysLineHdlr(uchar *pCmdName, int bChainingPermitted, ecslCmdHdrlType eType, rsRetVal (*pHdlr)(), void *pData,
void *pOwnerCookie)
{
DEFiRet;
cslCmd_t *pThis;
uchar *pMyCmdName;
DEFiRet;
iRet = llFind(&llCmdList, (void *) pCmdName, (void*) &pThis);
if(iRet == RS_RET_NOT_FOUND) {

10
net.c
View File

@ -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) {

View File

@ -88,7 +88,6 @@ rsRetVal thrdTerminate(thrdInfo_t *pThis)
{
assert(pThis != NULL);
dbgprintf("Terminate thread %lx\n", pThis->thrdID);
pthread_cancel(pThis->thrdID);
pthread_join(pThis->thrdID, NULL); /* wait for cancel to complete */
pThis->bIsActive = 0;