summaryrefslogtreecommitdiff
path: root/databases/slony1/patches/patch-src_slonik_slonik.c
blob: 764228b0c270444e69d85d99ee77bf613eea87e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-src_slonik_slonik.c,v 1.1 2017/02/24 22:07:34 adam Exp $

Include alloca.h only when it has been detected.

--- src/slonik/slonik.c.orig	2017-02-24 21:59:57.000000000 +0000
+++ src/slonik/slonik.c
@@ -22,7 +22,6 @@
 #include <ctype.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <alloca.h>
 #else
 #include <winsock2.h>
 #include <windows.h>
@@ -44,6 +43,9 @@
 #include "../parsestatements/scanner.h"
 extern int	STMTS[MAXSTATEMENTS];
 
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
 
 #ifdef HAVE_PGPORT
 #undef USE_REPL_SNPRINTF