summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--busybox.h8
-rw-r--r--include/busybox.h8
-rw-r--r--klogd.c1
-rw-r--r--logread.c10
-rw-r--r--sysklogd/klogd.c1
-rw-r--r--sysklogd/logread.c10
6 files changed, 34 insertions, 4 deletions
diff --git a/busybox.h b/busybox.h
index 7ae6485..977fe33 100644
--- a/busybox.h
+++ b/busybox.h
@@ -35,6 +35,14 @@
#include "dmalloc.h"
#endif
+/* Stupid libc doesn't have a reliable way for use to know
+ * that libc5 is being used. Assume this is good enough */
+#if ! defined __GLIBC__ || ! defined __UCLIBC__
+/* libc5 doesn't define socklen_t */
+typedef unsigned int socklen_t;
+#endif
+
+
/* Some useful definitions */
#define FALSE ((int) 0)
#define TRUE ((int) 1)
diff --git a/include/busybox.h b/include/busybox.h
index 7ae6485..977fe33 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -35,6 +35,14 @@
#include "dmalloc.h"
#endif
+/* Stupid libc doesn't have a reliable way for use to know
+ * that libc5 is being used. Assume this is good enough */
+#if ! defined __GLIBC__ || ! defined __UCLIBC__
+/* libc5 doesn't define socklen_t */
+typedef unsigned int socklen_t;
+#endif
+
+
/* Some useful definitions */
#define FALSE ((int) 0)
#define TRUE ((int) 1)
diff --git a/klogd.c b/klogd.c
index 7f7d6a1..d5e330b 100644
--- a/klogd.c
+++ b/klogd.c
@@ -43,7 +43,6 @@
#if ! defined __GLIBC__ && ! defined __UCLIBC__
#include <sys/syscall.h>
#include <linux/unistd.h>
-typedef unsigned int socklen_t;
#ifndef __alpha__
# define __NR_klogctl __NR_syslog
diff --git a/logread.c b/logread.c
index 66054e6..85c1e24 100644
--- a/logread.c
+++ b/logread.c
@@ -23,6 +23,15 @@
*
*/
+
+/* Stupid libc doesn't have a reliable way for use to know
+ * that libc5 is being used. Assume this is good enough */
+#if defined __GLIBC__ || defined __UCLIBC__
+#error Sorry. Looks like you are using libc5.
+#error libc5 shm support isn't good enough.
+#error Please disable BB_FEATURE_IPC_SYSLOG
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -134,4 +143,3 @@ static void error_exit(const char *str){
exit(1);
}
-
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c
index 7f7d6a1..d5e330b 100644
--- a/sysklogd/klogd.c
+++ b/sysklogd/klogd.c
@@ -43,7 +43,6 @@
#if ! defined __GLIBC__ && ! defined __UCLIBC__
#include <sys/syscall.h>
#include <linux/unistd.h>
-typedef unsigned int socklen_t;
#ifndef __alpha__
# define __NR_klogctl __NR_syslog
diff --git a/sysklogd/logread.c b/sysklogd/logread.c
index 66054e6..85c1e24 100644
--- a/sysklogd/logread.c
+++ b/sysklogd/logread.c
@@ -23,6 +23,15 @@
*
*/
+
+/* Stupid libc doesn't have a reliable way for use to know
+ * that libc5 is being used. Assume this is good enough */
+#if defined __GLIBC__ || defined __UCLIBC__
+#error Sorry. Looks like you are using libc5.
+#error libc5 shm support isn't good enough.
+#error Please disable BB_FEATURE_IPC_SYSLOG
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -134,4 +143,3 @@ static void error_exit(const char *str){
exit(1);
}
-