aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-12-20 23:55:52 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-12-21 02:59:59 +0000
commit5615f7fb4930762849f417201da143341d795c0e (patch)
tree4b878daad1277ec4034c9a2a12d4f4bba1a67856
parent2203cb975e26974b07f965be30ae2eff8cbe227b (diff)
downloadaports-5615f7fb4930762849f417201da143341d795c0e.tar.gz
aports-5615f7fb4930762849f417201da143341d795c0e.tar.bz2
aports-5615f7fb4930762849f417201da143341d795c0e.tar.xz
community/dillo: fix build with -fno-common
-rw-r--r--community/dillo/APKBUILD4
-rw-r--r--community/dillo/gcc-10.patch102
2 files changed, 105 insertions, 1 deletions
diff --git a/community/dillo/APKBUILD b/community/dillo/APKBUILD
index 6ec66c69ffb..685357a17c4 100644
--- a/community/dillo/APKBUILD
+++ b/community/dillo/APKBUILD
@@ -13,6 +13,7 @@ subpackages="$pkgname-doc"
source="http://www.dillo.org/download/dillo-$pkgver.tar.bz2
dillo.desktop
dillo.png::https://www.dillo.org/Icons/ProgramIcon48.png
+ gcc-10.patch
"
prepare() {
@@ -51,4 +52,5 @@ package() {
sha512sums="d0e86f57e50da762debf592b6deb94de5ee58f84e0cae1159890262540a463aea8143d2b99c634021c1f273f91c2fe0918f30d72c3eaf91fdb541e741469b155 dillo-3.0.5.tar.bz2
393a749d33f78e4c8a99c0c94a9708b26d235356f0c8dfa942af4e8da7eb9aa2453911894461714986449dfd15a4b492ef9071fac6b230f52a8f2e562f1bf016 dillo.desktop
-cfc9bcf1bfd0fff7fc625c7d288c92d0f33418b963a4e344844fd2bcb33823b3215a8a1a86162dcd1c614eea2323bb361c11bd8bd15859b771c63943c1b40833 dillo.png"
+cfc9bcf1bfd0fff7fc625c7d288c92d0f33418b963a4e344844fd2bcb33823b3215a8a1a86162dcd1c614eea2323bb361c11bd8bd15859b771c63943c1b40833 dillo.png
+7cb0e73fd26028ad85edbf2c9ca86dd47728b6447ef10ede293fc0de11497f900d0a1f9ee90d4bf1a2e9137a4cebe96a491f3024bdb281ec7f7b68ea7a200ad6 gcc-10.patch"
diff --git a/community/dillo/gcc-10.patch b/community/dillo/gcc-10.patch
new file mode 100644
index 00000000000..b027a570140
--- /dev/null
+++ b/community/dillo/gcc-10.patch
@@ -0,0 +1,102 @@
+Taken from Gentoo
+
+--- a/dpid/dpid.c
++++ b/dpid/dpid.c
+@@ -41,6 +41,26 @@
+ volatile sig_atomic_t caught_sigchld = 0;
+ char *SharedKey = NULL;
+
++char *srs_name;
++
++/*! dpid's service request socket file descriptor */
++int srs_fd;
++
++/*! Number of available plugins */
++int numdpis;
++
++/*! Number of sockets being watched */
++int numsocks;
++
++/*! State information for each plugin. */
++struct dp *dpi_attr_list;
++
++/*! service served for each plugin */
++Dlist *services_list;
++
++/*! Set of sockets watched for connections */
++fd_set sock_set;
++
+ /*! Remove dpid_comm_keys file.
+ * This avoids that dillo instances connect to a stale port after dpid
+ * has exited (e.g. after a reboot).
+--- 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.c
++++ b/dpid/dpid_common.c
+@@ -14,6 +14,9 @@
+ #include <unistd.h>
+ #include "dpid_common.h"
+
++/*! Error codes for dpid */
++dpi_errno_t dpi_errno;
++
+ /*
+ * Send a verbose error message.
+ */
+--- a/dpid/dpid_common.h
++++ b/dpid/dpid_common.h
+@@ -35,12 +35,13 @@
+ #define CKD_WRITE(fd, msg) ckd_write(fd, msg, __FILE__, __LINE__)
+ #define CKD_CLOSE(fd) ckd_close(fd, __FILE__, __LINE__)
+
+-
+ /*! Error codes for dpid */
+-enum {
++typedef enum {
+ no_errors,
+ dpid_srs_addrinuse /* dpid service request socket address already in use */
+-} dpi_errno;
++} dpi_errno_t;
++
++extern dpi_errno_t dpi_errno;
+
+ /*! Intended for identifying dillo plugins
+ * and related files