diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-16 15:40:31 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-03-16 15:40:57 +0000 |
commit | e87ef4feab4a2f2f6c3366723b70dafd5c8c0540 (patch) | |
tree | 8ac3fe75e18df66ace9fa9e0892a34580c331b84 /main/libwebsockets | |
parent | c860144b5b79ea667fbedcc34a800637b0339b88 (diff) | |
download | aports-e87ef4feab4a2f2f6c3366723b70dafd5c8c0540.tar.bz2 aports-e87ef4feab4a2f2f6c3366723b70dafd5c8c0540.tar.xz |
main/libwebsockets: fix build on 32bit arch
Diffstat (limited to 'main/libwebsockets')
-rw-r--r-- | main/libwebsockets/APKBUILD | 6 | ||||
-rw-r--r-- | main/libwebsockets/fix-format-error.patch | 104 |
2 files changed, 108 insertions, 2 deletions
diff --git a/main/libwebsockets/APKBUILD b/main/libwebsockets/APKBUILD index 1c0ed45b46..958eec968f 100644 --- a/main/libwebsockets/APKBUILD +++ b/main/libwebsockets/APKBUILD @@ -9,7 +9,8 @@ arch="all" license="LGPL2.1" makedepends="cmake zlib-dev libressl-dev" subpackages="$pkgname-doc $pkgname-dev $pkgname-test:_test" -source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/$pkgname/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/warmcat/$pkgname/archive/v$pkgver.tar.gz + fix-format-error.patch" builddir="$srcdir/$pkgname-$pkgver" build() { @@ -39,4 +40,5 @@ _test() { mv "$pkgdir"/usr/share "$pkgdir"/usr/bin "$subpkgdir"/usr/ } -sha512sums="0a6525c496bd51660ad95fa2a98d3de9a42580c03c48c564bfe1a87664e34a30aba28fedefa322b310d07314a905420d874d232d3d077a5192143224247a686a libwebsockets-2.2.0.tar.gz" +sha512sums="0a6525c496bd51660ad95fa2a98d3de9a42580c03c48c564bfe1a87664e34a30aba28fedefa322b310d07314a905420d874d232d3d077a5192143224247a686a libwebsockets-2.2.0.tar.gz +47114b02a7271cf47e34f0b91e1226d49374b9657157e11815f536807451637a5499e86e4f4bb29d9fd7b7548308291933f7049eee6cf865d133c6a3a4b00b0b fix-format-error.patch" diff --git a/main/libwebsockets/fix-format-error.patch b/main/libwebsockets/fix-format-error.patch new file mode 100644 index 0000000000..f7609597dc --- /dev/null +++ b/main/libwebsockets/fix-format-error.patch @@ -0,0 +1,104 @@ +From 34842d7492b728349f6a6898e3893b08d70625fa Mon Sep 17 00:00:00 2001 +From: honjane <chun_2325@qq.com> +Date: Thu, 9 Mar 2017 13:17:07 +0800 +Subject: [PATCH] http2: fix log compile errors + +--- + lib/http2.c | 2 +- + lib/output.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/http2.c b/lib/http2.c +index c020c7e..7406513 100644 +--- a/lib/http2.c ++++ b/lib/http2.c +@@ -169,7 +169,7 @@ int lws_http2_frame_write(struct lws *wsi, int type, int flags, + *p++ = sid >> 8; + *p++ = sid; + +- lwsl_info("%s: %p (eff %p). type %d, flags 0x%x, sid=%d, len=%d\n", ++ lwsl_info("%s: %p (eff %p). type %d, flags 0x%x, sid=%d, len=%d, tx_credit=%d\n", + __func__, wsi, wsi_eff, type, flags, sid, len, + wsi->u.http2.tx_credit); + +diff --git a/lib/output.c b/lib/output.c +index efc9573..0e5fcfd 100644 +--- a/lib/output.c ++++ b/lib/output.c +@@ -492,7 +492,7 @@ LWS_VISIBLE int lws_write(struct lws *wsi, unsigned char *buf, size_t len, + wsi->u.http.content_length) { + wsi->u.http.content_remain -= len; + lwsl_info("%s: content_remain = %lu\n", __func__, +- wsi->u.http.content_remain); ++ (unsigned long)wsi->u.http.content_remain); + if (!wsi->u.http.content_remain) { + lwsl_info("%s: selecting final write mode\n", __func__); + wp = LWS_WRITE_HTTP_FINAL; +From 3c02868408fac702af860e349868a8dedc778c12 Mon Sep 17 00:00:00 2001 +From: Silas Parker <skyhisi@user.github.invalid.com> +Date: Thu, 9 Mar 2017 18:52:10 +0800 +Subject: [PATCH] gcc-format-strings: 32-bit build + +--- + lib/fops-zip.c | 4 ++-- + lib/lws-plat-unix.c | 4 ++-- + test-server/test-server-http.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/fops-zip.c b/lib/fops-zip.c +index 140419b..f255055 100644 +--- a/lib/fops-zip.c ++++ b/lib/fops-zip.c +@@ -224,7 +224,7 @@ lws_fops_zip_scan(lws_fops_zip_t priv, const char *name, int len) + if (get_u32(buf + ZC_SIGNATURE) != 0x02014B50) + return LWS_FZ_ERR_CENTRAL_SANITY; + +- lwsl_debug("cstart 0x%lx\n", priv->content_start); ++ lwsl_debug("cstart 0x%lx\n", (unsigned long)priv->content_start); + + priv->hdr.filename_len = get_u16(buf + ZC_FILE_NAME_LENGTH); + priv->hdr.extra = get_u16(buf + ZC_EXTRA_FIELD_LENGTH); +@@ -272,7 +272,7 @@ lws_fops_zip_scan(lws_fops_zip_t priv, const char *name, int len) + get_u16(buf + ZL_REL_OFFSET_CONTENT); + + lwsl_debug("content supposed to start at 0x%lx\n", +- priv->content_start); ++ (unsigned long)priv->content_start); + + if (priv->content_start > priv->zip_fop_fd->len) + return LWS_FZ_ERR_CONTENT_SANITY; +diff --git a/lib/lws-plat-unix.c b/lib/lws-plat-unix.c +index 49c3d21..3349079 100644 +--- a/lib/lws-plat-unix.c ++++ b/lib/lws-plat-unix.c +@@ -669,7 +669,7 @@ _lws_plat_file_seek_cur(lws_fop_fd_t fop_fd, lws_fileofs_t offset) + fop_fd->pos = r; + else + lwsl_err("error seeking from cur %ld, offset %ld\n", +- fop_fd->pos, offset); ++ (long)fop_fd->pos, (long)offset); + + return r; + } +@@ -687,7 +687,7 @@ _lws_plat_file_read(lws_fop_fd_t fop_fd, lws_filepos_t *amount, + } + fop_fd->pos += n; + lwsl_debug("%s: read %ld of req %ld, pos %ld, len %ld\n", __func__, n, +- (long)len, fop_fd->pos, fop_fd->len); ++ (long)len, (long)fop_fd->pos, (long)fop_fd->len); + *amount = n; + + return 0; +diff --git a/test-server/test-server-http.c b/test-server/test-server-http.c +index 81445ca..9c122b7 100644 +--- a/test-server/test-server-http.c ++++ b/test-server/test-server-http.c +@@ -184,7 +184,7 @@ int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user, + struct per_session_data__http *pss = + (struct per_session_data__http *)user; + unsigned char buffer[4096 + LWS_PRE]; +- unsigned long amount, file_len, sent; ++ lws_filepos_t amount, file_len, sent; + char leaf_path[1024]; + const char *mimetype; + char *other_headers; |