File: fix-FTBFS-with-gcc-10.patch

package info (click to toggle)
dillo 3.0.5-7.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,560 kB
  • sloc: cpp: 33,618; ansic: 19,437; sh: 4,006; makefile: 561; perl: 131
file content (75 lines) | stat: -rw-r--r-- 1,700 bytes parent folder | download | duplicates (2)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Description: Fix FTBFS with gcc-10
 Amended 2024-08-06 by mirabilos <tg@debian.org>
Bug-Debian: https://bugs.debian.org/957136
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1799282
Author: Axel Beckert <abe@debian.org>
Forwarded: no

--- a/dpid/dpid.h
+++ b/dpid/dpid.h
@@ -25,10 +25,10 @@
 
 /*! \TODO: Should read this from dillorc */
 #define SRS_NAME "dpid.srs"
-char *srs_name;
+extern char *srs_name;
 
 /*! dpid's service request socket file descriptor */
-int srs_fd;
+extern int srs_fd;
 
 /*! plugin state information
  */
@@ -49,19 +49,19 @@
 };
 
 /*! Number of available plugins */
-int numdpis;
+extern int numdpis;
 
 /*! Number of sockets being watched */
-int numsocks;
+extern int numsocks;
 
 /*! State information for each plugin. */
-struct dp *dpi_attr_list;
+extern struct dp *dpi_attr_list;
 
 /*! service served for each plugin  */
-Dlist *services_list;
+extern Dlist *services_list;
 
 /*! Set of sockets watched for connections */
-fd_set sock_set;
+extern fd_set sock_set;
 
 /*! Set to 1 by the SIGCHLD handler dpi_sigchld */
 extern volatile sig_atomic_t caught_sigchld;
--- a/dpid/dpid_common.h
+++ b/dpid/dpid_common.h
@@ -38,7 +38,7 @@
 
 
 /*! Error codes for dpid */
-enum {
+extern enum dpi_errno_type {
    no_errors,
    dpid_srs_addrinuse /* dpid service request socket address already in use */
 } dpi_errno;
--- a/dpid/main.c
+++ b/dpid/main.c
@@ -31,6 +31,14 @@
 #include "../dpip/dpip.h"
 
 sigset_t mask_sigchld;
+char *srs_name;
+int srs_fd;
+int numdpis;
+int numsocks;
+struct dp *dpi_attr_list;
+Dlist *services_list;
+fd_set sock_set;
+enum dpi_errno_type dpi_errno;
 
 
 /* Start a dpi filter plugin after accepting the pending connection