From 190127f355adb7af70db42b3dfa6315c32212f0d Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 15 May 2007 09:37:58 +0000 Subject: [PATCH] fix segfault, okay robert@ --- databases/p5-DBD-SQLite/Makefile | 4 ++-- .../p5-DBD-SQLite/patches/patch-dbdimp_c | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 databases/p5-DBD-SQLite/patches/patch-dbdimp_c diff --git a/databases/p5-DBD-SQLite/Makefile b/databases/p5-DBD-SQLite/Makefile index 17ff75e56a3..350c69cda70 100644 --- a/databases/p5-DBD-SQLite/Makefile +++ b/databases/p5-DBD-SQLite/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2006/12/10 23:17:42 espie Exp $ +# $OpenBSD: Makefile,v 1.12 2007/05/15 09:37:58 espie Exp $ SHARED_ONLY= Yes @@ -6,7 +6,7 @@ COMMENT= 'SQLite drivers for the Perl DBI' MODULES= cpan DISTNAME= DBD-SQLite-1.12 -PKGNAME= p5-${DISTNAME}v0 +PKGNAME= p5-${DISTNAME}p0v0 CATEGORIES= databases perl5 MAINTAINER= Robert Nagy diff --git a/databases/p5-DBD-SQLite/patches/patch-dbdimp_c b/databases/p5-DBD-SQLite/patches/patch-dbdimp_c new file mode 100644 index 00000000000..85f6a66e6aa --- /dev/null +++ b/databases/p5-DBD-SQLite/patches/patch-dbdimp_c @@ -0,0 +1,23 @@ +$OpenBSD: patch-dbdimp_c,v 1.3 2007/05/15 09:37:58 espie Exp $ +--- dbdimp.c.orig Mon Apr 10 03:50:05 2006 ++++ dbdimp.c Tue May 15 11:09:38 2007 +@@ -677,11 +677,14 @@ sqlite_st_FETCH_attrib (SV *sth, imp_sth_t *imp_sth, S + retsv = sv_2mortal(newRV(sv_2mortal((SV*)av))); + for (n = 0; n < i; n++) { + const char *fieldtype = sqlite3_column_decltype(imp_sth->stmt, n); +- int type = sqlite3_column_type(imp_sth->stmt, n); +- /* warn("got type: %d = %s\n", type, fieldtype); */ +- type = type_to_odbc_type(type); +- /* av_store(av, n, newSViv(type)); */ +- av_store(av, n, newSVpv(fieldtype, 0)); ++ int type = sqlite3_column_type(imp_sth->stmt, n); ++ /* warn("got type: %d = %s\n", type, fieldtype); */ ++ type = type_to_odbc_type(type); ++ /* av_store(av, n, newSViv(type)); */ ++ if (fieldtype) ++ av_store(av, n, newSVpv(fieldtype, 0)); ++ else ++ av_store(av, n, newSVpv("VARCHAR", 0)); + } + } + else if (strEQ(key, "NULLABLE")) {