![Thomas Petazzoni](/assets/img/avatar_default.png)
This commit add a stack of small patches that make sysklogd build fine with the musl C library. Build with uClibc and glibc has been tested with those patches applied as well. The first patch is slightly rework (better description and capital letter to the title) in preparation for upstream submission. Fixes: http://autobuild.buildroot.net/results/8fa2bf73f983330884bce2e5ac31e01dee112ba9/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
From fe92a7a8197241f7d6b28ea3c8214bb6d2c7fda4 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Date: Mon, 28 Nov 2016 23:10:55 +0100
|
|
Subject: [PATCH] Remove bogus hand-written klogctl() syscall implementation
|
|
|
|
The way the hand-written klogctl() syscall is written cannot compile, as
|
|
_syscall3() is just a function provided by the C library, so calling it
|
|
outside of a function doesn't build.
|
|
|
|
Since the musl C library provides a klogctl() function, we don't need
|
|
this hand-written system call anyway.
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
---
|
|
klogd.c | 5 -----
|
|
1 file changed, 5 deletions(-)
|
|
|
|
diff --git a/klogd.c b/klogd.c
|
|
index 6505d96..9219671 100644
|
|
--- a/klogd.c
|
|
+++ b/klogd.c
|
|
@@ -274,13 +274,8 @@
|
|
|
|
#define __LIBRARY__
|
|
#include <linux/unistd.h>
|
|
-#if !defined(__GLIBC__)
|
|
-# define __NR_ksyslog __NR_syslog
|
|
-_syscall3(int,ksyslog,int, type, char *, buf, int, len);
|
|
-#else
|
|
#include <sys/klog.h>
|
|
#define ksyslog klogctl
|
|
-#endif
|
|
|
|
#define LOG_BUFFER_SIZE 4096
|
|
#define LOG_LINE_LENGTH 1000
|
|
--
|
|
2.7.4
|
|
|