wide-dhcpv6: Compile for for uClibc-0.9.31.
[packages.git] / ipv6 / wide-dhcpv6 / patches / 002-fix-dprintf-clash.patch
1 Index: wide-dhcpv6-20080615/common.c
2 ===================================================================
3 --- wide-dhcpv6-20080615.orig/common.c  2010-11-02 22:07:03.161000001 +0100
4 +++ wide-dhcpv6-20080615/common.c       2010-11-02 22:07:19.532000002 +0100
5 @@ -3207,7 +3207,7 @@
6  }
7  
8  void
9 -dprintf(int level, const char *fname, const char *fmt, ...)
10 +my_dprintf(int level, const char *fname, const char *fmt, ...)
11  {
12         va_list ap;
13         char logbuf[LINE_MAX];
14 Index: wide-dhcpv6-20080615/Makefile.in
15 ===================================================================
16 --- wide-dhcpv6-20080615.orig/Makefile.in       2010-11-02 22:07:03.151000001 +0100
17 +++ wide-dhcpv6-20080615/Makefile.in    2010-11-02 22:07:19.533000002 +0100
18 @@ -37,7 +37,7 @@
19  group= @group@
20  
21  CFLAGS=        @CFLAGS@ @DEFS@ -DSYSCONFDIR=\"${sysconfdir}\" \
22 -       -DLOCALDBDIR=\"${localdbdir}\"
23 +       -DLOCALDBDIR=\"${localdbdir}\" $(EXTRA_CFLAGS)
24  LDFLAGS=@LDFLAGS@
25  LIBOBJS=@LIBOBJS@
26  LIBS=  @LIBS@ @LEXLIB@
27 Index: wide-dhcpv6-20080615/common.h
28 ===================================================================
29 --- wide-dhcpv6-20080615.orig/common.h  2010-11-02 22:07:23.187000002 +0100
30 +++ wide-dhcpv6-20080615/common.h       2010-11-02 22:08:43.646001043 +0100
31 @@ -155,7 +155,6 @@
32  extern int in6_addrscopebyif __P((struct in6_addr *, char *));
33  extern int in6_scope __P((struct in6_addr *));
34  extern void setloglevel __P((int));
35 -extern void dprintf __P((int, const char *, const char *, ...));
36  extern int get_duid __P((char *, struct duid *));
37  extern void dhcp6_init_options __P((struct dhcp6_optinfo *));
38  extern void dhcp6_clear_options __P((struct dhcp6_optinfo *));
39 Index: wide-dhcpv6-20080615/debug.h
40 ===================================================================
41 --- /dev/null   1970-01-01 00:00:00.000000000 +0000
42 +++ wide-dhcpv6-20080615/debug.h        2010-11-02 22:14:58.354999418 +0100
43 @@ -0,0 +1,13 @@
44 +#ifndef MY_DEBUG_H_
45 +#define MY_DEBUG_H_
46 +
47 +/* First include stdio.h, which may contain the prototype for the external dprintf.
48 + * We do not want that. We redefine dprintf to our local implementation. */
49 +#include <stdio.h>
50 +#define dprintf my_dprintf
51 +#ifndef __P
52 +# define __P(x) x
53 +#endif
54 +extern void my_dprintf __P((int, const char *, const char *, ...));
55 +
56 +#endif /* MY_DEBUG_H_ */