Accepting request 296734 from home:Nijel:branches:hardware
- Fix compatibility with libdbi snapshot from Git we are using OBS-URL: https://build.opensuse.org/request/show/296734 OBS-URL: https://build.opensuse.org/package/show/hardware/gammu?expand=0&rev=26
This commit is contained in:
parent
1ea4a688eb
commit
60e1996568
52
Compatibility-with-libdbi-from-git.patch
Normal file
52
Compatibility-with-libdbi-from-git.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 1a360969313237b9cd0507163c9a2c320c8c3692 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= <michal@cihar.com>
|
||||
Date: Wed, 15 Apr 2015 10:04:45 +0200
|
||||
Subject: [PATCH 1/1] Compatibility with libdbi from git.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Michal Čihař <michal@cihar.com>
|
||||
---
|
||||
ChangeLog | 4 +++-
|
||||
smsd/services/dbi.c | 4 ++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/smsd/services/dbi.c b/smsd/services/dbi.c
|
||||
index d204a96..9d585e9 100644
|
||||
--- a/smsd/services/dbi.c
|
||||
+++ b/smsd/services/dbi.c
|
||||
@@ -58,6 +58,10 @@ long long SMSDDBI_GetNumber(GSM_SMSDConfig * Config, SQL_result *res, unsigned i
|
||||
}
|
||||
SMSD_Log(DEBUG_ERROR, Config, "Wrong decimal field subtype from DBI: %d", type);
|
||||
return -1;
|
||||
+#ifdef DBI_TYPE_XDECIMAL
|
||||
+ case DBI_TYPE_XDECIMAL:
|
||||
+ return dbi_result_get_as_longlong_idx(res->dbi, field);
|
||||
+#endif
|
||||
default:
|
||||
SMSD_Log(DEBUG_ERROR, Config, "Wrong field type for number (not INTEGER nor DECIMAL) from DBI: %d", type);
|
||||
return -1;
|
||||
@@ -79,6 +79,9 @@ time_t SMSDDBI_GetDate(GSM_SMSDConfig * Config, SQL_result *res, unsigned int fi
|
||||
switch (type) {
|
||||
case DBI_TYPE_INTEGER:
|
||||
case DBI_TYPE_DECIMAL:
|
||||
+#ifdef DBI_TYPE_XDECIMAL
|
||||
+ case DBI_TYPE_XDECIMAL:
|
||||
+#endif
|
||||
return SMSDDBI_GetNumber(Config, res, field);
|
||||
case DBI_TYPE_STRING:
|
||||
date = dbi_result_get_string_idx(res->dbi, field);
|
||||
@@ -104,6 +107,9 @@ gboolean SMSDDBI_GetBool(GSM_SMSDConfig * Config, SQL_result *res, unsigned int
|
||||
switch (type) {
|
||||
case DBI_TYPE_INTEGER:
|
||||
case DBI_TYPE_DECIMAL:
|
||||
+#ifdef DBI_TYPE_XDECIMAL
|
||||
+ case DBI_TYPE_XDECIMAL:
|
||||
+#endif
|
||||
num = SMSDDBI_GetNumber(Config, res, field);
|
||||
if (num == -1) {
|
||||
return -1;
|
||||
--
|
||||
2.1.4
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 08:06:34 UTC 2015 - mcihar@suse.cz
|
||||
|
||||
- Fix compatibility with libdbi snapshot from Git we are using
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 14 08:58:20 UTC 2015 - mcihar@suse.cz
|
||||
|
||||
|
@ -30,6 +30,8 @@ Source0: http://dl.cihar.com/gammu/releases/%{name}-%{version}.tar.xz
|
||||
Patch0: gammu-smsd.lsb.patch
|
||||
# PATCH-FIX-OPENSUSE gammu-remove-gplv3-files.patch idoenmez@suse.de -- Remove GPLv3 files bnc#775397
|
||||
Patch1: gammu-remove-gplv3-files.patch
|
||||
# PATCH-FIX-UPSTREAM -- Upstream patch for libdbi from git (which we are using)
|
||||
Patch2: Compatibility-with-libdbi-from-git.patch
|
||||
# Docdir
|
||||
%if 0%{?fedora_version} || 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora} || 0%{?rhel}
|
||||
%define gammu_docdir %{_docdir}/%{name}-%{version}
|
||||
@ -268,6 +270,7 @@ This package contains the Gammu SMS daemon shared library.
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
# Change permissions - Fix rpmlint warning "doc-file-dependency"
|
||||
chmod 644 contrib/init/gammu-smsd.lsb
|
||||
|
Loading…
x
Reference in New Issue
Block a user