Sync from SUSE:SLFO:Main perl-DBD-mysql revision 466b1c1f9eeb8003c981cf475f2fa862
This commit is contained in:
parent
5ef0081e7d
commit
5e0901233f
@ -4,9 +4,8 @@ description_paragraphs: 1
|
|||||||
#sources:
|
#sources:
|
||||||
# - source1
|
# - source1
|
||||||
# - source2
|
# - source2
|
||||||
#patches:
|
patches:
|
||||||
# foo.patch: -p1
|
perl-DBD-mysql-gcc14.patch: -p1
|
||||||
# bar.patch:
|
|
||||||
preamble: |-
|
preamble: |-
|
||||||
BuildRequires: libmariadb-devel
|
BuildRequires: libmariadb-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
40
perl-DBD-mysql-gcc14.patch
Normal file
40
perl-DBD-mysql-gcc14.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 93bc876808af048091bf76d6908a9748d0476ab9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eric Herman <eric@freesa.org>
|
||||||
|
Date: Thu, 10 Jan 2019 10:22:38 +0100
|
||||||
|
Subject: [PATCH] Fix "assignment from incompatible pointer type"
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
I encountered this warning from gcc 7.3.0 building on Ubuntu:
|
||||||
|
|
||||||
|
dbdimp.c: In function ‘mysql_st_prepare’:
|
||||||
|
dbdimp.c:3207:24: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
|
||||||
|
bind->is_null= (_Bool*) &(fbind->is_null);
|
||||||
|
|
||||||
|
The "MYSQL_BIND" field "is_null" is of type "my_bool", not "_Bool".
|
||||||
|
|
||||||
|
The type "my_bool" is (usually) type-defined to be of a "char" type.
|
||||||
|
|
||||||
|
Regardless, the "imp_sth_phb_t" field "is_null" is of type "char".
|
||||||
|
|
||||||
|
This commit removes the cast, which means that if we later discover
|
||||||
|
that "my_bool" is defined to be of a type incompatible with the
|
||||||
|
"imp_sth_phb_t" field "is_null", it will break at compile-time.
|
||||||
|
---
|
||||||
|
dbdimp.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/dbdimp.c b/dbdimp.c
|
||||||
|
index b0399d94..e7e6c007 100644
|
||||||
|
--- a/dbdimp.c
|
||||||
|
+++ b/dbdimp.c
|
||||||
|
@@ -3204,7 +3204,7 @@ dbd_st_prepare(
|
||||||
|
bind->buffer_type= MYSQL_TYPE_STRING;
|
||||||
|
bind->buffer= NULL;
|
||||||
|
bind->length= &(fbind->length);
|
||||||
|
- bind->is_null= (_Bool*) &(fbind->is_null);
|
||||||
|
+ bind->is_null= &(fbind->is_null);
|
||||||
|
fbind->is_null= 1;
|
||||||
|
fbind->length= 0;
|
||||||
|
}
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 6 13:55:14 UTC 2024 - Pedro Monreal <pmonreal@suse.com>
|
||||||
|
|
||||||
|
- Fix build with gcc14: [bsc#1221011]
|
||||||
|
* Upstream PR: https://github.com/perl5-dbi/DBD-mysql/pull/295
|
||||||
|
* Add perl-DBD-mysql-gcc14.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 13 15:05:24 UTC 2019 - Vítězslav Čížek <vcizek@suse.com>
|
Wed Feb 13 15:05:24 UTC 2019 - Vítězslav Čížek <vcizek@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package perl-DBD-mysql
|
# spec file for package perl-DBD-mysql
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,9 +23,10 @@ Release: 0
|
|||||||
Summary: MySQL driver for the Perl5 Database Interface (DBI)
|
Summary: MySQL driver for the Perl5 Database Interface (DBI)
|
||||||
License: Artistic-1.0 OR GPL-1.0-or-later
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
||||||
Group: Development/Libraries/Perl
|
Group: Development/Libraries/Perl
|
||||||
Url: https://metacpan.org/release/%{cpan_name}
|
URL: https://metacpan.org/release/%{cpan_name}
|
||||||
Source0: https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/%{cpan_name}-%{version}.tar.gz
|
Source0: https://cpan.metacpan.org/authors/id/D/DV/DVEEDEN/%{cpan_name}-%{version}.tar.gz
|
||||||
Source1: cpanspec.yml
|
Source1: cpanspec.yml
|
||||||
|
Patch0: perl-DBD-mysql-gcc14.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: perl-macros
|
BuildRequires: perl-macros
|
||||||
@ -49,7 +50,7 @@ are supported. Some rarely used functions are missing, mainly because
|
|||||||
no-one ever requested them. :-)
|
no-one ever requested them. :-)
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{cpan_name}-%{version}
|
%autosetup -p1 -n %{cpan_name}-%{version}
|
||||||
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
Reference in New Issue
Block a user