summaryrefslogtreecommitdiff
path: root/libhw_cr/host_net.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-16 05:27:40 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-16 05:27:40 -0600
commitfdc9b04c051c7a49dcc48866b5675e06b9a87abe (patch)
tree30008026f025696066024c8d32001cf938afb9cc /libhw_cr/host_net.c
parent802ed1e3cd0252cafd1be2aada0addf4d3f7eb2e (diff)
parentf56ae03840bb264163c4035eb72fbac938847638 (diff)
Merge branch 'lukeshu/9p-fix-flush'
Diffstat (limited to 'libhw_cr/host_net.c')
-rw-r--r--libhw_cr/host_net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libhw_cr/host_net.c b/libhw_cr/host_net.c
index 6ed6e46..ba634a6 100644
--- a/libhw_cr/host_net.c
+++ b/libhw_cr/host_net.c
@@ -19,6 +19,7 @@
#include <signal.h> /* for siginfo_t, struct sigaction, enum sigval, sigaction(), SA_SIGINFO */
#include <libcr/coroutine.h>
+#include <libmisc/alloc.h>
#include <libmisc/assert.h>
#include <libmisc/macro.h>
#include <libobj/obj.h>
@@ -283,7 +284,7 @@ static void *hostnet_pthread_writev(void *_args) {
struct hostnet_pthread_writev_args *args = _args;
size_t count = 0;
- struct iovec *iov = alloca(sizeof(struct iovec)*args->iovcnt);
+ struct iovec *iov = stack_alloc(args->iovcnt, struct iovec);
for (int i = 0; i < args->iovcnt; i++) {
iov[i] = args->iov[i];
count += args->iov[i].iov_len;