]> TLD Linux GIT Repositories - packages/rpm.git/commitdiff
- fix building with recent glibc
authorMarcin Krol <hawk@tld-linux.org>
Tue, 23 Oct 2018 10:50:11 +0000 (10:50 +0000)
committerMarcin Krol <hawk@tld-linux.org>
Tue, 23 Oct 2018 10:50:11 +0000 (10:50 +0000)
rpm-glibc.patch [new file with mode: 0644]
rpm.spec

diff --git a/rpm-glibc.patch b/rpm-glibc.patch
new file mode 100644 (file)
index 0000000..ea8240b
--- /dev/null
@@ -0,0 +1,56 @@
+diff -urp rpm-4.5.orig/rpmio/rpmio.c rpm-4.5/rpmio/rpmio.c
+--- rpm-4.5.orig/rpmio/rpmio.c 2018-10-23 10:42:28.780416609 +0000
++++ rpm-4.5/rpmio/rpmio.c      2018-10-23 10:46:39.497416609 +0000
+@@ -422,7 +422,7 @@ static inline int fdSeek(void * cookie,
+       /*@modifies fileSystem, internalState @*/
+ {
+ #ifdef USE_COOKIE_SEEK_POINTER
+-    _IO_off64_t p = *pos;
++    off64_t p = *pos;
+ #else
+     off_t p = pos;
+ #endif
+@@ -2432,7 +2432,7 @@ static inline int gzdSeek(void * cookie,
+       /*@modifies fileSystem, internalState @*/
+ {
+ #ifdef USE_COOKIE_SEEK_POINTER
+-    _IO_off64_t p = *pos;
++    off64_t p = *pos;
+ #else
+     off_t p = pos;
+ #endif
+@@ -2804,7 +2804,7 @@ DBGIO(fd, (stderr, "==> Fwrite(%p,%u,%u,
+ int Fseek(FD_t fd, _libio_off_t offset, int whence) {
+     fdio_seek_function_t _seek;
+ #ifdef USE_COOKIE_SEEK_POINTER
+-    _IO_off64_t o64 = offset;
++    off64_t o64 = offset;
+     _libio_pos_t pos = &o64;
+ #else
+     _libio_pos_t pos = offset;
+@@ -2989,13 +2989,6 @@ static inline void cvtfmode (const char
+ }
+ /*@=boundswrite@*/
+-#if _USE_LIBIO
+-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+-/* XXX retrofit glibc-2.1.x typedef on glibc-2.0.x systems */
+-typedef _IO_cookie_io_functions_t cookie_io_functions_t;
+-#endif
+-#endif
+-
+ /*@-boundswrite@*/
+ FD_t Fdopen(FD_t ofd, const char *fmode)
+ {
+diff -urp rpm-4.5.orig/rpmio/rpmio.h rpm-4.5/rpmio/rpmio.h
+--- rpm-4.5.orig/rpmio/rpmio.h 2018-10-23 10:42:28.788416609 +0000
++++ rpm-4.5/rpmio/rpmio.h      2018-10-23 10:43:19.413416609 +0000
+@@ -34,7 +34,7 @@ typedef /*@abstract@*/ struct pgpDigPara
+ #if !defined(__LCLINT__) && defined(__GLIBC__) && \
+       (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
+ #define USE_COOKIE_SEEK_POINTER 1
+-typedef _IO_off64_t   _libio_off_t;
++typedef off64_t       _libio_off_t;
+ typedef _libio_off_t *        _libio_pos_t;
+ #else
+ typedef off_t                 _libio_off_t;
index f67bfd23e73be38507c2f0dafff40c2b7984e4b3..aa9ef4eb16e13889f26242e97a860cf147b75291 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -42,7 +42,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       4.5
-Release:       83
+Release:       84
 License:       LGPL
 Group:         Base
 Source0:       %{name}-%{version}.tar.gz
@@ -174,6 +174,7 @@ Patch111:   %{name}-shrink.patch
 Patch112:      notrans.patch
 Patch113:      %{name}-rubyprov.patch
 Patch114:      %{name}-ruby-gem-build.patch
+Patch115:      %{name}-glibc.patch
 URL:           http://rpm5.org/
 BuildRequires: autoconf >= 2.57
 BuildRequires: automake >= 1.4
@@ -815,6 +816,7 @@ install %{SOURCE13} scripts/perl.prov
 %patch112 -p1
 %patch113 -p1
 %patch114 -p1
+%patch115 -p1
 
 mv -f po/{sr,sr@Latn}.po
 rm -rf sqlite zlib popt