Code

patches: Added include_config_h.dpatch.
[pkg-ncmpc.git] / debian / patches / include_config_h.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## include_config_h.dpatch by Sebastian Harl <sh@tokkee.org>
3 ##
4 ## DP: include "config.h" in all files using HAVE_* defines
6 @DPATCH@
8 diff a/src/hscroll.h b/src/hscroll.h
9 --- a/src/hscroll.h
10 +++ b/src/hscroll.h
11 @@ -20,6 +20,8 @@
12  #ifndef HSCROLL_H
13  #define HSCROLL_H
14  
15 +#include "config.h"
16 +
17  #include <glib.h>
18  
19  #ifdef HAVE_NCURSESW_NCURSES_H
20 diff a/src/resolver.c b/src/resolver.c
21 --- a/src/resolver.c
22 +++ b/src/resolver.c
23 @@ -30,6 +30,7 @@
24     SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  */
26  
27 +#include "config.h"
28  #include "resolver.h"
29  
30  #include <netdb.h>
31 diff a/src/screen_browser.c b/src/screen_browser.c
32 --- a/src/screen_browser.c
33 +++ b/src/screen_browser.c
34 @@ -17,6 +17,7 @@
35   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
36  */
37  
38 +#include "config.h"
39  #include "screen_browser.h"
40  #include "screen_file.h"
41  #include "screen_song.h"
42 diff a/src/screen_interface.h b/src/screen_interface.h
43 --- a/src/screen_interface.h
44 +++ b/src/screen_interface.h
45 @@ -20,6 +20,7 @@
46  #ifndef NCMPC_SCREEN_INTERFACE_H
47  #define NCMPC_SCREEN_INTERFACE_H
48  
49 +#include "config.h"
50  #include "command.h"
51  
52  #include <stdbool.h>
53 diff a/src/song_paint.h b/src/song_paint.h
54 --- a/src/song_paint.h
55 +++ b/src/song_paint.h
56 @@ -20,6 +20,8 @@
57  #ifndef NCMPC_SONG_PAINT_H
58  #define NCMPC_SONG_PAINT_H
59  
60 +#include "config.h"
61 +
62  #include <stdbool.h>
63  
64  #ifdef HAVE_NCURSESW_NCURSES_H
65 diff a/src/window.h b/src/window.h
66 --- a/src/window.h
67 +++ b/src/window.h
68 @@ -20,6 +20,8 @@
69  #ifndef NCMPC_WINDOW_H
70  #define NCMPC_WINDOW_H
71  
72 +#include "config.h"
73 +
74  #ifdef HAVE_NCURSESW_NCURSES_H
75  #include <ncursesw/ncurses.h>
76  #else