Additional C compatibility fixes (#2152303)
This commit is contained in:
parent
c8d8a169a6
commit
75c9099d0f
@ -4,6 +4,9 @@ This avoids an implicit function declaration of vsprintf.
|
|||||||
snprintf is only called from db.1.85/btree/bt_open.c, and the length
|
snprintf is only called from db.1.85/btree/bt_open.c, and the length
|
||||||
checking in the glibc implementation seems harmless there.
|
checking in the glibc implementation seems harmless there.
|
||||||
|
|
||||||
|
Furthermore, NULL is not a valid integer constant, so use 0 directly
|
||||||
|
(the __bt_first function in bt_seq.c returns int).
|
||||||
|
|
||||||
diff -ur db-5.3.28.orig/db.1.85/PORT/linux/Makefile db-5.3.28/db.1.85/PORT/linux/Makefile
|
diff -ur db-5.3.28.orig/db.1.85/PORT/linux/Makefile db-5.3.28/db.1.85/PORT/linux/Makefile
|
||||||
--- db-5.3.28.orig/db.1.85/PORT/linux/Makefile 2022-12-10 12:29:48.599322424 +0100
|
--- db-5.3.28.orig/db.1.85/PORT/linux/Makefile 2022-12-10 12:29:48.599322424 +0100
|
||||||
+++ db-5.3.28/db.1.85/PORT/linux/Makefile 2022-12-10 12:35:08.415288426 +0100
|
+++ db-5.3.28/db.1.85/PORT/linux/Makefile 2022-12-10 12:35:08.415288426 +0100
|
||||||
@ -16,3 +19,16 @@ diff -ur db-5.3.28.orig/db.1.85/PORT/linux/Makefile db-5.3.28/db.1.85/PORT/linux
|
|||||||
|
|
||||||
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
|
${LIBDB}: ${OBJ1} ${OBJ2} ${OBJ3} ${OBJ4} ${OBJ5} ${MISC}
|
||||||
rm -f $@
|
rm -f $@
|
||||||
|
only in patch2:
|
||||||
|
unchanged:
|
||||||
|
--- db-5.3.28.orig/db.1.85/btree/bt_seq.c 1994-07-26 18:57:24.000000000 +0200
|
||||||
|
+++ db-5.3.28/db.1.85/btree/bt_seq.c 2024-01-05 15:53:31.859178929 +0100
|
||||||
|
@@ -358,7 +358,7 @@
|
||||||
|
* page) and return it.
|
||||||
|
*/
|
||||||
|
if ((ep = __bt_search(t, key, exactp)) == NULL)
|
||||||
|
- return (NULL);
|
||||||
|
+ return 0;
|
||||||
|
if (*exactp) {
|
||||||
|
if (F_ISSET(t, B_NODUPS)) {
|
||||||
|
*erval = *ep;
|
||||||
|
@ -23,15 +23,18 @@ diff -ur db-5.3.28.orig/dist/aclocal/clock.m4 db-5.3.28/dist/aclocal/clock.m4
|
|||||||
struct timespec t;
|
struct timespec t;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||||
], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no))
|
], db_cv_clock_monotonic=yes, db_cv_clock_monotonic=no))
|
||||||
diff -ur db-5.3.28.orig/dist/aclocal/mmap.m4 db-5.3.28/dist/aclocal/mmap.m4
|
diff -u db-5.3.28/dist/aclocal/mmap.m4 db-5.3.28/dist/aclocal/mmap.m4
|
||||||
--- db-5.3.28.orig/dist/aclocal/mmap.m4 2013-09-09 17:35:02.000000000 +0200
|
--- db-5.3.28/dist/aclocal/mmap.m4 2024-01-05 16:07:07.340002918 +0100
|
||||||
+++ db-5.3.28/dist/aclocal/mmap.m4 2022-12-10 12:38:04.520617781 +0100
|
+++ db-5.3.28/dist/aclocal/mmap.m4 2024-01-05 16:45:12.128407358 +0100
|
||||||
@@ -45,10 +45,10 @@
|
@@ -42,13 +42,11 @@
|
||||||
int catch_sig(sig)
|
#define MAP_FAILED (-1)
|
||||||
int sig;
|
#endif
|
||||||
|
|
||||||
|
- int catch_sig(sig)
|
||||||
|
- int sig;
|
||||||
|
+ void catch_sig(int sig)
|
||||||
{
|
{
|
||||||
- exit(1);
|
- exit(1);
|
||||||
+ return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- main() {
|
- main() {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
Summary: The Berkeley DB database library for C
|
Summary: The Berkeley DB database library for C
|
||||||
Name: libdb
|
Name: libdb
|
||||||
Version: 5.3.28
|
Version: 5.3.28
|
||||||
Release: 58%{?dist}
|
Release: 59%{?dist}
|
||||||
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
|
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
|
||||||
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
|
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
|
||||||
# For mt19937db.c
|
# For mt19937db.c
|
||||||
@ -486,6 +486,9 @@ install -m 0755 db_converter-%{_converter_version}/db_converter %{buildroot}/%{_
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 05 2024 Florian Weimer <fweimer@redhat.com> - 5.3.28-59
|
||||||
|
- Additional C compatibility fixes (#2152303)
|
||||||
|
|
||||||
* Fri Sep 08 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 5.3.28-58
|
* Fri Sep 08 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 5.3.28-58
|
||||||
- Re-enable subpackages in RHEL builds
|
- Re-enable subpackages in RHEL builds
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user