diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-06-11 08:29:27 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-06-11 08:29:27 +0000 |
commit | 81378442ff2a89b20595ee52a25b21383df7bf9d (patch) | |
tree | f4484d4b8ad290fbd52fb38992d8cdf7339089cf | |
parent | 81ae51f0393e75b0e65c9b1e84d399e54f2dd7c4 (diff) | |
download | rsyslog-81378442ff2a89b20595ee52a25b21383df7bf9d.tar.gz rsyslog-81378442ff2a89b20595ee52a25b21383df7bf9d.tar.xz rsyslog-81378442ff2a89b20595ee52a25b21383df7bf9d.zip |
changes to make klogd integration compile under freebsd
-rw-r--r-- | freebsd/Makefile | 7 | ||||
-rw-r--r-- | klogd.c | 8 | ||||
-rw-r--r-- | ksym.c | 3 | ||||
-rw-r--r-- | ksym_mod.c | 3 |
4 files changed, 19 insertions, 2 deletions
diff --git a/freebsd/Makefile b/freebsd/Makefile index 7b05766f..2170544f 100644 --- a/freebsd/Makefile +++ b/freebsd/Makefile @@ -39,6 +39,9 @@ FEATURE_PTHREADS=1 # results in moderate savings of network traffic. FEATURE_NETZIP=1 +# For Freebsd, we disable klogd +FEATURE_KLOGD=0 + # Enable debug mode (much slower code) FEATURE_DEBUG=0 @@ -71,6 +74,10 @@ MANDIR = /usr/share/man WITHDB=-DWITH_DB .endif +.if $(FEATURE_KLOGD) == 1 + WITHDB=-DWITH_KLOGD +.endif + .if $(FEATURE_NETZIP) == 1 NETZIP=-DWITH_DB .endif @@ -19,6 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifdef WITH_KLOGD /* * Steve Lord (lord@cray.com) 7th Nov 92 * @@ -1169,6 +1170,13 @@ int main(argc, argv) } } } +#else /* #ifdef WITH_KLOGD */ +#include <stdio.h> +void main() +{ + fprintf(stderr, "FEATURE_KLOGD was disabled during this build, so klogd is not available.\n"); +} +#endif /* #ifdef WITH_KLOGD */ /* * Local variables: * c-indent-level: 8 @@ -1,3 +1,4 @@ +#ifdef FEATURE_KLOGD /* ksym.c - functions for kernel address->symbol translation Copyright (c) 1995, 1996 Dr. G.W. Wettstein <greg@wind.rmcc.com> @@ -110,7 +111,6 @@ /* Includes. */ #include <stdlib.h> -#include <malloc.h> #include <sys/utsname.h> #include <ctype.h> #include "klogd.h" @@ -980,3 +980,4 @@ extern void Syslog(int priority, char *fmt, ...) return; } #endif +#endif /* #ifdef FEATURE_KLOGD */ @@ -1,3 +1,4 @@ +#ifdef FEATURE_KLOGD /* ksym_mod.c - functions for building symbol lookup tables for klogd Copyright (c) 1995, 1996 Dr. G.W. Wettstein <greg@wind.rmcc.com> @@ -83,7 +84,6 @@ /* Includes. */ #include <stdlib.h> -#include <malloc.h> #include <unistd.h> #include <signal.h> #include <errno.h> @@ -698,3 +698,4 @@ extern void Syslog(int priority, char *fmt, ...) } #endif +#endif /* #ifdef FEATURE_KLOGD */ |