File: compilation-fixes.patch

package info (click to toggle)
heroes 0.21-21
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 5,796 kB
  • sloc: ansic: 27,951; sh: 3,941; makefile: 651; yacc: 318; sed: 51; lisp: 10; perl: 9
file content (48 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Description: GCC 6 compilation fixes
Author: Stephen Kitt <skitt@debian.org>

Add a missing header.
Propagate packed attributes as necessary.

--- a/lib/xstrduplwr.c
+++ b/lib/xstrduplwr.c
@@ -25,6 +25,7 @@
 
 #include <sys/types.h>
 #include <ctype.h>
+#include <string.h>
 
 #include "xalloc.h"
 #include "xstrduplwr.h"
--- a/src/pcx.h
+++ b/src/pcx.h
@@ -23,7 +23,7 @@
 
 #include "video.h"
 
-typedef struct pcx_header_type
+typedef struct ATTRIBUTE_PACKED pcx_header_type
 {
   a_u8 signature;
   a_u8 version;
@@ -39,9 +39,9 @@
   a_u16 palette_kind;
   a_u8 rien[58];
 }
-a_pcx_header ATTRIBUTE_PACKED;
+a_pcx_header;
 
-typedef struct
+typedef struct ATTRIBUTE_PACKED
 {
   a_u8 r, g, b;
 }
@@ -54,7 +54,7 @@
 }
 a_palette;
 
-typedef struct img_type
+typedef struct ATTRIBUTE_PACKED img_type
 {
   a_pcx_header header;
   a_palette palette;