From d995a9ab6910b237bfbdfd25dcb28376735ad4bf Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Sat, 26 Aug 2023 03:29:26 +0100 Subject: 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 --- src/c/include/unit/unit-wasm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/c/include/unit/unit-wasm.h') diff --git a/src/c/include/unit/unit-wasm.h b/src/c/include/unit/unit-wasm.h index 8d91094..dedf15a 100644 --- a/src/c/include/unit/unit-wasm.h +++ b/src/c/include/unit/unit-wasm.h @@ -161,7 +161,7 @@ extern u32 luw_malloc_handler(size_t size); #pragma GCC visibility push(default) extern void luw_init_ctx(luw_ctx_t *ctx, u8 *addr, size_t offset); -extern int luw_set_req_buf(luw_ctx_t *ctx, u8 **buf, unsigned long flags); +extern int luw_set_req_buf(luw_ctx_t *ctx, u8 **buf, unsigned int flags); extern const char *luw_get_http_path(const luw_ctx_t *ctx); extern const char *luw_get_http_method(const luw_ctx_t *ctx); extern const char *luw_get_http_version(const luw_ctx_t *ctx); -- cgit