SHA256
6
0
forked from pool/rpm

Accepting request 109293 from home:vuntz:branches:Base:System

Fix build with gcc 4.7; rebased DimStar's changes

OBS-URL: https://build.opensuse.org/request/show/109293
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=192
This commit is contained in:
2012-03-16 19:46:40 +00:00
committed by Git OBS Bridge
parent a0b3eae26e
commit 5e05072509
3 changed files with 35 additions and 1 deletions

27
rpm-gcc47.patch Normal file
View File

@@ -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 <inttypes.h>
+#include <arpa/inet.h>
#include <rpm/rpmtypes.h>
#include <rpm/rpmstring.h>