aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-09-21 20:51:14 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-09-21 20:56:46 -0300
commit8711ea27392f8a03f9430736792d1313969cd2ca (patch)
tree3ac0ce4ffdb899d6792bc6a9c567c31488d99c72
parentb913691a5cf7948a15b5bc3c48f8dfe2c9a69b04 (diff)
downloadaports-8711ea27392f8a03f9430736792d1313969cd2ca.tar.gz
aports-8711ea27392f8a03f9430736792d1313969cd2ca.tar.bz2
aports-8711ea27392f8a03f9430736792d1313969cd2ca.tar.xz
main/nginx: fix build with gcc-10
Taken from Debian
-rw-r--r--main/nginx/APKBUILD2
-rw-r--r--main/nginx/nchan~gcc-10.patch59
2 files changed, 61 insertions, 0 deletions
diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
index 12f8a99807..2da128e6f3 100644
--- a/main/nginx/APKBUILD
+++ b/main/nginx/APKBUILD
@@ -71,6 +71,7 @@ source="https://nginx.org/download/$pkgname-$pkgver.tar.gz
$pkgname.logrotate
$pkgname.initd
$pkgname.confd
+ nchan~gcc-10.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -380,6 +381,7 @@ ac7e3153ab698b4cde077f0d5d7ac0a58897927eb36cf3b58cb01268ca0296f1d589c0a5b4f889b9
09b110693e3f4377349ccea3c43cb8199c8579ee351eae34283299be99fdf764b0c1bddd552e13e4d671b194501618b29c822e1ad53b34101a73a63954363dbb nginx.logrotate
ee10a5687740dde0c3d18d8b3555f49fcdc6abfc0a3bc2de1de3be0e99951a346fe8027d916aab73071ecd4e2c50871e7c867aca3a7a0fd16e3374c5caed1c57 nginx.initd
0b9b9ed01ac077e334c034faa2679f6e26740fb3362eebf8cef82d22b2af2a3faaa53bae3c9e14af51cbf64720a7c66431905ca5cc43f978366456cc4e3b7f4a nginx.confd
+9e65be0bf1edc003252c60ce3e6e7ea17f2b9f27c8b387aae8c5ae697733dd1882f28116e8de2ee2c3c27f36e91687bd1fed0c46bf7d79246cf7b85864f745a6 nchan~gcc-10.patch
de1e3349d8dd08e5982279b2219dc8a8006739f0409b8e0f5c50d93434beff1fbafba43e9c5ac85a5fab90afc5c0a7244a340610339c36f82f2cba7233e72de9 ngx_devel_kit-0.3.1.tar.gz
05a880d5e48ac83be84498ed41fb4750211b827a9d7541acfd6ef494e5205a6e853d5594bfec3ab4ae668ea3f803e4f4b0ba550c76811971c8e266e42663c56d ngx_brotli-1.0.0rc.tar.gz
1f6c15b148856e5d258ed804b8340ae286e8ef925128ba230c59c24c3412c60e58952be4511e8360695cb5301268a9a3407760b0887323e6f46ccc9e81a73642 ngx_cache_purge-2.5.tar.gz
diff --git a/main/nginx/nchan~gcc-10.patch b/main/nginx/nchan~gcc-10.patch
new file mode 100644
index 0000000000..170db967eb
--- /dev/null
+++ b/main/nginx/nchan~gcc-10.patch
@@ -0,0 +1,59 @@
+From f484c603a81c3bddd3f0160cfdbe231b8a453cde Mon Sep 17 00:00:00 2001
+From: Leo P <junk@slact.net>
+Date: Wed, 24 Jun 2020 15:28:07 -0400
+Subject: [PATCH] GCC 10 compatibility
+Origin: https://github.com/slact/nchan/commit/f484c603a81c3bddd3f0160cfdbe231b8a453cde
+
+---
+ src/store/memory/memstore.c | 2 ++
+ src/store/memory/store-private.h | 2 +-
+ src/store/redis/redis_lua_commands.h | 7 +++++--
+ 5 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/store/memory/memstore.c b/src/store/memory/memstore.c
+index 2844220c..f0f78acc 100755
+--- a/src/store/memory/memstore.c
++++ b/src/store/memory/memstore.c
+@@ -40,6 +40,8 @@ static ngx_int_t redis_fakesub_timer_interval;
+
+ #endif
+
++uint16_t memstore_worker_generation;
++
+
+ typedef struct {
+ //memstore_channel_head_t unbuffered_dummy_chanhead;
+diff --git a/src/store/memory/store-private.h b/src/store/memory/store-private.h
+index e4a426a3..49de940b 100644
+--- a/src/store/memory/store-private.h
++++ b/src/store/memory/store-private.h
+@@ -172,6 +172,6 @@ ngx_int_t chanhead_gc_withdraw(memstore_channel_head_t *chanhead, const char *);
+ void memstore_chanhead_release(memstore_channel_head_t *ch, char *label);
+ void memstore_chanhead_reserve(memstore_channel_head_t *ch, const char *label);
+
+-uint16_t memstore_worker_generation; //times nginx has been restarted + 1
++extern uint16_t memstore_worker_generation; //times nginx has been restarted + 1
+
+ #endif /*MEMSTORE_PRIVATE_HEADER*/
+diff --git a/src/store/redis/redis_lua_commands.h b/src/store/redis/redis_lua_commands.h
+index 76fb7b95..2efb25bd 100644
+--- a/src/store/redis/redis_lua_commands.h
++++ b/src/store/redis/redis_lua_commands.h
+@@ -1,3 +1,5 @@
++#ifndef NCHAN_REDIS_LUA_SCRIPTS_H
++#define NCHAN_REDIS_LUA_SCRIPTS_H
+ // don't edit this please, it was auto-generated by hsss
+ // https://github.com/slact/hsss
+
+@@ -63,7 +65,8 @@ typedef struct {
+ redis_lua_script_t subscriber_unregister;
+
+ } redis_lua_scripts_t;
+-redis_lua_scripts_t redis_lua_scripts;
+-const int redis_lua_scripts_count;
++extern redis_lua_scripts_t redis_lua_scripts;
++extern const int redis_lua_scripts_count;
+ #define REDIS_LUA_SCRIPTS_EACH(script) \
+ for((script)=(redis_lua_script_t *)&redis_lua_scripts; (script) < (redis_lua_script_t *)(&redis_lua_scripts + 1); (script)++)
++#endif //NCHAN_REDIS_LUA_SCRIPTS_H
+