summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--freebsd/Makefile2
-rw-r--r--klogd.c7
-rw-r--r--linux/Makefile9
-rw-r--r--master.make6
4 files changed, 17 insertions, 7 deletions
diff --git a/freebsd/Makefile b/freebsd/Makefile
index 2170544f..22d674e3 100644
--- a/freebsd/Makefile
+++ b/freebsd/Makefile
@@ -75,7 +75,7 @@ MANDIR = /usr/share/man
.endif
.if $(FEATURE_KLOGD) == 1
- WITHDB=-DWITH_KLOGD
+ FEATKLOGD=-DFEATURE_KLOGD
.endif
.if $(FEATURE_NETZIP) == 1
diff --git a/klogd.c b/klogd.c
index a7087e4c..81cb3058 100644
--- a/klogd.c
+++ b/klogd.c
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifdef WITH_KLOGD
+#ifdef FEATURE_KLOGD
/*
* Steve Lord (lord@cray.com) 7th Nov 92
*
@@ -1170,11 +1170,12 @@ int main(argc, argv)
}
}
}
-#else /* #ifdef WITH_KLOGD */
+#else /* #ifdef FEATURE_KLOGD */
#include <stdio.h>
-void main()
+int main()
{
fprintf(stderr, "FEATURE_KLOGD was disabled during this build, so klogd is not available.\n");
+ return(1);
}
#endif /* #ifdef WITH_KLOGD */
/*
diff --git a/linux/Makefile b/linux/Makefile
index 75d68507..39ea440c 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -41,6 +41,11 @@ FEATURE_RFC3195=0
# Enable multithreading via pthreads (experimental!)
FEATURE_PTHREADS=1
+# This feature indicates if klogd functionality
+# should be integrated. If it is switched off, klogd
+# is still compiled, but it is an empty shell.
+FEATURE_KLOGD=1
+
# Enable debug mode (much slower code)
FEATURE_DEBUG=0
@@ -72,6 +77,10 @@ ifeq ($(strip $(FEATURE_DB)), 1)
WITHDB=-DWITH_DB
endif
+ifeq ($(strip $(FEATURE_KLOGD)), 1)
+ FEATKLOGD=-DFEATURE_KLOGD
+endif
+
ifeq ($(strip $(FEATURE_REGEXP)), 1)
F_REGEXP=-DFEATURE_REGEXP
endif
diff --git a/master.make b/master.make
index 0ddc450e..d8d2e506 100644
--- a/master.make
+++ b/master.make
@@ -66,13 +66,13 @@ syslog.o: syslog.c
${CC} ${CFLAGS} ${SYSLOG_FLAGS} -c $(VPATH)syslog.c
klogd.o: klogd.c klogd.h version.h
- ${CC} ${CFLAGS} ${KLOGD_FLAGS} $(DEB) -c $(VPATH)klogd.c
+ ${CC} ${CFLAGS} ${KLOGD_FLAGS} ${FEATKLOGD} $(DEB) -c $(VPATH)klogd.c
ksym.o: ksym.c klogd.h
- ${CC} ${CFLAGS} ${KLOGD_FLAGS} -c $(VPATH)ksym.c
+ ${CC} ${CFLAGS} ${KLOGD_FLAGS} ${FEATKLOGD} -c $(VPATH)ksym.c
ksym_mod.o: ksym_mod.c klogd.h
- ${CC} ${CFLAGS} ${KLOGD_FLAGS} -c $(VPATH)ksym_mod.c
+ ${CC} ${CFLAGS} ${KLOGD_FLAGS} ${FEATKLOGD} -c $(VPATH)ksym_mod.c
clean:
rm -f *.o *.log *~ *.orig syslogd rfc3195d