$OpenBSD: patch-src_pyodbc_h,v 1.2 2019/11/23 14:32:28 sthen Exp $

#1: alloca
#2: pyodbc wants BYTE which is unixodbc's sqltypes.h but not iodbc's version.

Index: src/pyodbc.h
--- src/pyodbc.h.orig
+++ src/pyodbc.h
@@ -96,7 +96,7 @@ inline void UNUSED(...) { }
 #include <stdarg.h>
 
 #if defined(__SUNPRO_CC) || defined(__SUNPRO_C) || (defined(__GNUC__) && !defined(__MINGW32__))
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
 #include <alloca.h>
 #endif
 #define CDECL cdecl
@@ -147,6 +147,10 @@ inline void DebugTrace(const char* szFmt, ...) { UNUSE
 #define pyodbc_malloc malloc
 #define pyodbc_free free
 // #endif
+
+#ifndef BYTE
+    typedef uint8_t BYTE;
+#endif
 
 bool pyodbc_realloc(BYTE** pp, size_t newlen);
 // A wrapper around realloc with a safer interface.  If it is successful, *pp is updated to the
