Index: config.h.in --- config.h.in.orig 2012-05-22 09:49:32.000000000 +0200 +++ config.h.in 2012-05-27 14:03:46.000000000 +0200 @@ -326,7 +326,9 @@ #undef NO_MINUS_C_MINUS_O /* Indicator for a BSD OS */ +#ifndef OS_BSD #undef OS_BSD +#endif /* Indicator for a Linux OS */ #undef OS_LINUX Index: grammar/lexer.l --- grammar/lexer.l.orig 2012-05-10 10:29:20.000000000 +0200 +++ grammar/lexer.l 2012-05-27 14:45:22.000000000 +0200 @@ -83,12 +83,6 @@ extern int yydebug; -/* somehow, I need these prototype even though the headers are - * included. I guess that's some autotools magic I don't understand... - */ -//char *strdup(char*); -int fileno(FILE *stream); - %} %% Index: plugins/imuxsock/imuxsock.c --- plugins/imuxsock/imuxsock.c.orig 2012-05-10 10:29:20.000000000 +0200 +++ plugins/imuxsock/imuxsock.c 2012-05-27 14:50:00.000000000 +0200 @@ -780,8 +780,13 @@ memcpy(pmsgbuf+lenRcv, " @[", 3); toffs = lenRcv + 3; /* next free location */ lenProp = snprintf((char*)propBuf, sizeof(propBuf), "_PID=%lu _UID=%lu _GID=%lu", +#ifdef __linux__ (long unsigned) cred->pid, (long unsigned) cred->uid, (long unsigned) cred->gid); +#else + (long unsigned) cred->pid, (long unsigned)0, + (long unsigned)0); +#endif memcpy(pmsgbuf+toffs, propBuf, lenProp); toffs = toffs + lenProp; getTrustedProp(cred, "comm", propBuf, sizeof(propBuf), &lenProp); @@ -936,6 +941,7 @@ cred = NULL; ts = NULL; if(pLstn->bUseCreds || pLstn->bUseSysTimeStamp) { +#if HAVE_SCM_CREDENTIALS for(cm = CMSG_FIRSTHDR(&msgh); cm; cm = CMSG_NXTHDR(&msgh, cm)) { # if HAVE_SCM_CREDENTIALS if( pLstn->bUseCreds @@ -954,6 +960,7 @@ } # endif /* HAVE_SO_TIMESTAMP */ } +#endif } CHKiRet(SubmitMsg(pRcv, iRcvd, pLstn, cred, ts)); } else if(iRcvd < 0 && errno != EINTR) { Index: runtime/msg.c --- runtime/msg.c.orig 2012-05-10 10:29:20.000000000 +0200 +++ runtime/msg.c 2012-05-27 14:44:08.000000000 +0200 @@ -36,7 +36,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #include #include #include @@ -2750,6 +2752,7 @@ break; case PROP_SYS_UPTIME: { +#ifdef __linux__ struct sysinfo s_info; if((pRes = (uchar*) MALLOC(sizeof(uchar) * 32)) == NULL) { @@ -2763,6 +2766,9 @@ } snprintf((char*) pRes, sizeof(uchar) * 32, "%ld", s_info.uptime); +#else + snprintf((char*) pRes, sizeof(uchar) * 32, "%ld", 0); +#endif } break; default: