1 From 68213f6902d291d2ba1626fd950fd7d4a1329d33 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Mon, 28 Nov 2016 23:13:08 +0100
4 Subject: [PATCH] syslogd.c: rename dprintf() to mydprintf()
6 There is an existing kludge in syslogd.c to rename all dprintf()
7 function calls and its definition to mydprintf(). This kludge is only
8 applied when the glibc C library is used (i.e when GLIBC is defined),
9 because glibc also provides a dprintf() function, with a different
10 signature and behavior.
12 However, the musl C library also provides the dprintf() function (with
13 the same signature as the one in glibc, obviously), but does not define
14 the GLIBC macro, causing a conflicting definition of dprintf.
16 This commit fixes that by having the rename kludge used unconditionally.
18 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 1 file changed, 2 deletions(-)
23 diff --git a/syslogd.c b/syslogd.c
24 index b5e8054..22a9ed5 100644
27 @@ -818,9 +818,7 @@ void doexit(int sig);
29 void cfline(char *line, register struct filed *f);
30 int decode(char *name, struct code *codetab);
31 -#if defined(__GLIBC__)
32 #define dprintf mydprintf
33 -#endif /* __GLIBC__ */
34 static void dprintf(char *, ...);
35 static void allocate_log(void);
36 void sighup_handler();