summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-12-26 02:12:45 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-12-26 02:12:45 +0100
commit50639c9c2e489b13c615b5ffa9cb21f58ddc2f22 (patch)
tree1a632d1fecc58cdeb9c0d3b8943a30ca58ab23ac /src
parent7755b22419438356dcf62b54d7cce539bb4c7ce7 (diff)
downloadfastd-50639c9c2e489b13c615b5ffa9cb21f58ddc2f22.tar
fastd-50639c9c2e489b13c615b5ffa9cb21f58ddc2f22.zip
resolve: avoid using alloca as OpenBSD doesn't find it with -std=c99
Diffstat (limited to 'src')
-rw-r--r--src/resolve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve.c b/src/resolve.c
index 1bda382..64b1714 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -69,7 +69,8 @@ static void* resolve_peer(void *varg) {
n_addr++;
}
- fastd_resolve_return_t *ret = alloca(sizeof(fastd_resolve_return_t) + n_addr*sizeof(fastd_peer_address_t));
+ uint8_t retbuf[sizeof(fastd_resolve_return_t) + n_addr*sizeof(fastd_peer_address_t)];
+ fastd_resolve_return_t *ret = (fastd_resolve_return_t*)retbuf;
ret->remote = arg->remote;
if (n_addr) {