diff --git a/rpm-gcc47.patch b/rpm-gcc47.patch new file mode 100644 index 0000000..051137a --- /dev/null +++ b/rpm-gcc47.patch @@ -0,0 +1,27 @@ +Index: rpmio/rpmio.c +=================================================================== +--- rpmio/rpmio.c.orig ++++ rpmio/rpmio.c +@@ -1576,8 +1576,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n" + if (stdio[0] == '\0') + return NULL; + zstdio[0] = '\0'; +- strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio)); +- strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio)); ++ strncat(zstdio, stdio, sizeof(zstdio) - strlen(zstdio) - 1); ++ strncat(zstdio, other, sizeof(zstdio) - strlen(zstdio) - 1); + + if (end == NULL && other[0] == '\0') + return fd; +Index: lib/signature.c +=================================================================== +--- lib/signature.c.orig ++++ lib/signature.c +@@ -5,6 +5,7 @@ + #include "system.h" + + #include ++#include + + #include + #include diff --git a/rpm.changes b/rpm.changes index 124edb0..5c6cdb5 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 13 21:53:12 UTC 2012 - dimstar@opensuse.org + +- Add rpm-gcc47.patch: Fix build with gcc 4.7 by correcting a + strncat call and including missing headers. + ------------------------------------------------------------------- Tue Mar 13 14:40:47 UTC 2012 - vuntz@opensuse.org diff --git a/rpm.spec b/rpm.spec index c478e33..28055ac 100644 --- a/rpm.spec +++ b/rpm.spec @@ -137,6 +137,7 @@ Patch81: python3-abi-kind.diff Patch82: perl-python-attr.patch Patch83: findlang-new-help-fix.diff Patch84: langnoc.diff +Patch85: rpm-gcc47.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -210,7 +211,7 @@ rm -f rpmdb/db.h %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69 %patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79 -%patch -P 80 -P 81 -P 82 -P 83 -P 84 +%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov