$NetBSD: patch-ah,v 1.3 2005/11/08 16:40:38 joerg Exp $

--- contrib/cube/cubeparse.y.orig	2005-11-08 15:08:35.000000000 +0000
+++ contrib/cube/cubeparse.y
@@ -6,6 +6,8 @@
 #define YYSTYPE char *
 #define YYDEBUG 1
 
+#include <errno.h>
+
 #include "postgres.h"
 
 #include "cubedata.h"
@@ -14,7 +16,6 @@
 #define yylex cube_yylex     /* wrong scanner when running inside the postgres backend  */
 
 extern int yylex();           /* defined as cube_yylex in cubescan.c */
-extern int errno;
 
 static char *scanbuf;
 static int	scanbuflen;
