513c493c9e3ee274ffaf65edd4d912106d0197a9
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / imlib2 / 0004-fix-X_DISPLAY_MISSING-redefined-warnings-when-X-is-d.patch
1 From 7fb1a4468b9d0314cffcdd1fd2a156e6f8c5101b Mon Sep 17 00:00:00 2001
2 From: Mike Frysinger <vapier@gentoo.org>
3 Date: Mon, 28 Jul 2014 22:59:35 -0400
4 Subject: [PATCH 4/6] fix X_DISPLAY_MISSING redefined warnings when X is
5  disabled
6
7 This is set up in config.h by configure, so avoid defining it again.
8 ---
9  src/bin/imlib2_conv.c | 2 ++
10  src/lib/api.c         | 2 ++
11  src/lib/image.h       | 2 ++
12  src/lib/script.c      | 2 ++
13  4 files changed, 8 insertions(+)
14
15 diff --git a/src/bin/imlib2_conv.c b/src/bin/imlib2_conv.c
16 index 1b05b1f..1c46d0c 100644
17 --- a/src/bin/imlib2_conv.c
18 +++ b/src/bin/imlib2_conv.c
19 @@ -8,7 +8,9 @@
20  #include <stdio.h>
21  #include <string.h>
22  
23 +#ifndef X_DISPLAY_MISSING
24  #define X_DISPLAY_MISSING
25 +#endif
26  #include <Imlib2.h>
27  
28  #define PROG_NAME "imlib2_conv"
29 diff --git a/src/lib/api.c b/src/lib/api.c
30 index e29eaf0..178d2ca 100644
31 --- a/src/lib/api.c
32 +++ b/src/lib/api.c
33 @@ -4,8 +4,10 @@
34  #include <X11/Xutil.h>
35  #include <X11/extensions/shape.h>
36  #else
37 +#ifndef X_DISPLAY_MISSING
38  #define X_DISPLAY_MISSING
39  #endif
40 +#endif
41  #include <string.h>
42  #include <stdarg.h>
43  #include "common.h"
44 diff --git a/src/lib/image.h b/src/lib/image.h
45 index eef59d2..52dde9d 100644
46 --- a/src/lib/image.h
47 +++ b/src/lib/image.h
48 @@ -5,7 +5,9 @@
49  # ifdef BUILD_X11
50  #  include <X11/Xlib.h>
51  # else
52 +#ifndef X_DISPLAY_MISSING
53  #  define X_DISPLAY_MISSING
54 +#endif
55  # endif
56  
57  # include <dlfcn.h>
58 diff --git a/src/lib/script.c b/src/lib/script.c
59 index 55ebd4e..7c974c0 100644
60 --- a/src/lib/script.c
61 +++ b/src/lib/script.c
62 @@ -13,8 +13,10 @@
63  #ifdef BUILD_X11
64  #include <X11/Xlib.h>
65  #else
66 +#ifndef X_DISPLAY_MISSING
67  #define X_DISPLAY_MISSING
68  #endif
69 +#endif
70  #include "image.h"
71  #include "file.h"
72  #include "dynamic_filters.h"
73 -- 
74 2.3.1
75