summaryrefslogtreecommitdiffhomepage
path: root/src/c/libunit-wasm.c
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-08-26 03:29:26 +0100
committerAndrew Clayton <a.clayton@nginx.com>2023-08-26 03:36:31 +0100
commitd995a9ab6910b237bfbdfd25dcb28376735ad4bf (patch)
treef3568fc638c1988d60c9116f85a87a75276609d3 /src/c/libunit-wasm.c
parent1e045a5d5ca2e3e28119343970b2ccff13a64c65 (diff)
downloadunit-wasm-d995a9ab6910b237bfbdfd25dcb28376735ad4bf.tar.gz
unit-wasm-d995a9ab6910b237bfbdfd25dcb28376735ad4bf.tar.bz2
libunit-wasm: Fix rust build
The rust build failed when trying to publish new crates, although for some reason it didn't fail before that, due to the luw_srb_flags_t enums generated by bindgen being 32 bit unsigned integers and the flags argument to luw_set_req_buf() being an unsigned long (which is 64 bits on my system) and thus producing a type mismatch error. Rather than fight with rust just make the flags argument an unsigned int, 32 bits is more than enough for this anyway. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--src/c/libunit-wasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c/libunit-wasm.c b/src/c/libunit-wasm.c
index 39cda22..8cea78a 100644
--- a/src/c/libunit-wasm.c
+++ b/src/c/libunit-wasm.c
@@ -110,7 +110,7 @@ void luw_init_ctx(luw_ctx_t *ctx, u8 *addr, size_t offset)
* allocate memory for the _entire_ request that
* will eventually be sent.
*/
-int luw_set_req_buf(luw_ctx_t *ctx, u8 **buf, unsigned long flags)
+int luw_set_req_buf(luw_ctx_t *ctx, u8 **buf, unsigned int flags)
{
size_t alloc_size;
size_t copy_bytes;