Add 0001-freetds-resolve-compile-error-with-1.0.patch
OBS-URL: https://build.opensuse.org/package/show/server:database/libdbi-drivers?expand=0&rev=20
This commit is contained in:
parent
43878641e7
commit
facb1786d0
57
0001-freetds-resolve-compile-error-with-1.0.patch
Normal file
57
0001-freetds-resolve-compile-error-with-1.0.patch
Normal file
@ -0,0 +1,57 @@
|
||||
From 3bf3e4a856604703c4070bdebbe42fe0068f540a Mon Sep 17 00:00:00 2001
|
||||
From: Jan Engelhardt <jengelh@inai.de>
|
||||
Date: Fri, 27 Jan 2017 09:55:41 +0100
|
||||
Subject: [PATCH] freetds: resolve compile error with 1.0
|
||||
|
||||
dbd_freetds.c: In function "dbd_connect":
|
||||
dbd_freetds.c:232:12: error: "CS_TDS_80" undeclared (first use in this function)
|
||||
num = CS_TDS_80;
|
||||
|
||||
freetds 1.0 has dropped the CS_TDS_80 identifier. In 0.95, it defined
|
||||
CS_TDS_80=CS_TDS_71, while 0.91 has no CS_TDS_71, which is why a full
|
||||
autoconf check is needed.
|
||||
---
|
||||
acinclude.m4 | 13 +++++++++++++
|
||||
drivers/freetds/dbd_freetds.c | 2 +-
|
||||
2 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/acinclude.m4 b/acinclude.m4
|
||||
index 45db616..85eec28 100644
|
||||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -562,6 +562,19 @@ if test "$ac_freetds" = "yes"; then
|
||||
AC_SUBST(FREETDS_LIBS)
|
||||
AC_SUBST(FREETDS_INCLUDE)
|
||||
AC_SUBST(FREETDS_LDFLAGS)
|
||||
+
|
||||
+ AH_TEMPLATE([DBI_CS_TDS_80], [])
|
||||
+ AC_MSG_CHECKING([CS_TDS_80])
|
||||
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
+ #include <ctpublic.h>
|
||||
+ int x = CS_TDS_80;
|
||||
+ ])], [
|
||||
+ AC_DEFINE([DBI_CS_TDS_80], [CS_TDS_80])
|
||||
+ AC_MSG_RESULT([CS_TDS_80])
|
||||
+ ], [
|
||||
+ AC_DEFINE([DBI_CS_TDS_80], [CS_TDS_71])
|
||||
+ AC_MSG_RESULT([CS_TDS_71])
|
||||
+ ])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
diff --git a/drivers/freetds/dbd_freetds.c b/drivers/freetds/dbd_freetds.c
|
||||
index 22fddfd..d01f13b 100644
|
||||
--- a/drivers/freetds/dbd_freetds.c
|
||||
+++ b/drivers/freetds/dbd_freetds.c
|
||||
@@ -229,7 +229,7 @@ int dbd_connect(dbi_conn_t * conn)
|
||||
switch (str[0]) {
|
||||
// We can use it if "CS_TDS_80" will be add to ct_con_props() by CS_SET action
|
||||
case '8':
|
||||
- num = CS_TDS_80;
|
||||
+ num = DBI_CS_TDS_80;
|
||||
break;
|
||||
case '7':
|
||||
num = CS_TDS_70;
|
||||
--
|
||||
2.11.0
|
||||
|
3
libdbi-drivers-0.9.0.g52.tar.xz
Normal file
3
libdbi-drivers-0.9.0.g52.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2b2de10e1963110b1ca47445bc7861689aa91805f4af9e00db7fba131c3cf616
|
||||
size 247764
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3e076bf203880fa2039ab246f7e8cf5c9266b918f1b60838b1fff176a05c64f8
|
||||
size 247784
|
@ -1,8 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 27 09:07:26 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Update to new git snapshot 0.9.0.g53
|
||||
* Fix compile error with freetds 1.0
|
||||
- Update to new git snapshot 0.9.0.g52
|
||||
- Add 0001-freetds-resolve-compile-error-with-1.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 4 10:19:16 UTC 2016 - christof.hanke@rzg.mpg.de
|
||||
|
@ -22,7 +22,7 @@
|
||||
%endif
|
||||
|
||||
Name: libdbi-drivers
|
||||
Version: 0.9.0.g53
|
||||
Version: 0.9.0.g52
|
||||
Release: 0
|
||||
Summary: Database drivers for libdbi
|
||||
License: LGPL-2.1+
|
||||
@ -32,6 +32,7 @@ URL: http://libdbi-drivers.sf.net/
|
||||
#Source: http://downloads.sf.net/libdbi-drivers/%name-%version.tar.gz
|
||||
Source: %name-%version.tar.xz
|
||||
Patch1: configure.ac.patch
|
||||
Patch2: 0001-freetds-resolve-compile-error-with-1.0.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -117,6 +118,7 @@ does not require recompilation or rewriting source code.
|
||||
%if 0%{?suse_version} == 1110
|
||||
%patch -P 1 -p1
|
||||
%endif
|
||||
%patch -P 2 -p1
|
||||
chmod a-x COPYING
|
||||
|
||||
# Fake the __DATE__ so we do not needelessly rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user