commit 33fdf0d86dbc83f357ed64eb9e194f25df129197
parent 5aa18101b7b9c64b5ea9af2ade74b5cac8520b02
Author: Daniel Barlow <dan@telent.net>
Date: Mon, 13 Oct 2025 19:56:18 +0100
add missing prototype to fetch-freebsd lua glue to make it build
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/pkgs/fetch-freebsd/lua-glue.c b/pkgs/fetch-freebsd/lua-glue.c
@@ -72,6 +72,15 @@ int lp_fetch(lua_State *L) {
return lp_fetched(L, fp, &stat);
}
+/* http_request_body seems to be semi-private in libfetch, but if using
+ * only the fetch* functions there's no way to send an http request
+ * with a body, so we use it anyway
+ */
+extern FXRETTYPE
+http_request_body(struct url *URL, const char *op, struct url_stat *us,
+ struct url *purl, const char *flags, const char *content_type,
+ const char *body);
+
int lp_request(lua_State *L) {
const char * request_method = luaL_checkstring(L, 1);
const char * url_string = luaL_checkstring(L, 2);