--- ./bin/varnishd/waiter/cache_waiter_epoll.c.orig
+++ ./bin/varnishd/waiter/cache_waiter_epoll.c
@@ -68,7 +68,7 @@
 static void *
 vwe_thread(void *priv)
 {
-	struct epoll_event ev[NEEV], *ep;
+	struct epoll_event *ev, *ep;
 	struct waited *wp;
 	struct waiter *w;
 	double now, then;
@@ -80,6 +80,9 @@
 	w = vwe->waiter;
 	CHECK_OBJ_NOTNULL(w, WAITER_MAGIC);
 	THR_SetName("cache-epoll");
+	ev = calloc(NEEV, sizeof(struct epoll_event));
+	assert(ev != NULL);
+
 	THR_Init();
 
 	now = VTIM_real();
@@ -148,6 +151,7 @@
 	closefd(&vwe->pipe[0]);
 	closefd(&vwe->pipe[1]);
 	closefd(&vwe->epfd);
+	free(ev);
 	return (NULL);
 }
 
