From 008643785f6385e934b777a54be1e0a001f225dd Mon Sep 17 00:00:00 2001 From: Guilherme Bernal Date: Tue, 24 Jun 2014 16:11:57 -0300 Subject: [PATCH 1/2] libdvbpsi: fix compilation --- src/libdvbpsi-1.patch | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/libdvbpsi-1.patch diff --git a/src/libdvbpsi-1.patch b/src/libdvbpsi-1.patch new file mode 100644 index 00000000..639d638d --- /dev/null +++ b/src/libdvbpsi-1.patch @@ -0,0 +1,70 @@ +This file is part of MXE. +See index.html for further information. + +diff --git a/src/descriptor.h b/src/descriptor.h +--- a/src/descriptor.h ++++ b/src/descriptor.h +@@ -37,6 +37,7 @@ + #ifndef _DVBPSI_DESCRIPTOR_H_ + #define _DVBPSI_DESCRIPTOR_H_ + ++#include + #ifdef __cplusplus + extern "C" { + #endif + +diff --git a/configure b/configure +--- a/configure ++++ b/configure +@@ -11864,7 +11864,7 @@ + + CFLAGS_save="${CFLAGS}" + +-CFLAGS_dist="-Wall -Werror --std=gnu99 -D_GNU_SOURCE" ++CFLAGS_dist="-Wall -Werror --std=gnu99" + CFLAGS_dist="${CFLAGS_dist} -Wpointer-arith -Wcast-align -Wcast-qual -Wstrict-prototypes -Wshadow -Waggregate-return -Wmissing-prototypes -Wnested-externs -Wsign-compare" + + case "${target_os}" in + +diff --git a/src/dvbpsi.c b/src/dvbpsi.c +--- a/src/dvbpsi.c ++++ b/src/dvbpsi.c +@@ -531,12 +531,12 @@ + va_end(ap); + return; + } +- if (snprintf(&msg, DVBPSI_MSG_SIZE, DVBPSI_MSG_FORMAT, ap) < 0) { ++ if (snprintf(msg, DVBPSI_MSG_SIZE, DVBPSI_MSG_FORMAT, ap) < 0) { + va_end(ap); + free(msg); + return; + } +- int err = vsnprintf(&msg, DVBPSI_MSG_SIZE, fmt, ap); ++ int err = vsnprintf(msg, DVBPSI_MSG_SIZE, fmt, ap); + #endif + va_end(ap); + if (err > DVBPSI_MSG_NONE) { +@@ -575,7 +575,7 @@ + free(msg); \ + } while(0); + # else +-# define DVBPSI_MSG_COMMON \ ++# define DVBPSI_MSG_COMMON(level) \ + do { \ + va_list ap; \ + va_start(ap, fmt); \ +@@ -584,11 +584,11 @@ + va_end(ap); \ + return; \ + } \ +- if (snprintf(&msg, DVBPSI_MSG_SIZE, DVBPSI_MSG_FORMAT, src) < 0) { \ ++ if (snprintf(msg, DVBPSI_MSG_SIZE, DVBPSI_MSG_FORMAT, "?", src) < 0) { \ + va_end(ap); \ + return; \ + } \ +- int err = vsnprintf(&msg, DVBPSI_MSG_SIZE, fmt, ap); \ ++ int err = vsnprintf(msg, DVBPSI_MSG_SIZE, fmt, ap); \ + va_end(ap); \ + if (err > 0) { \ + if (dvbpsi->pf_message) \ + From b00e2eee5565f5b237f777cc9dae1fbb316fdb02 Mon Sep 17 00:00:00 2001 From: Guilherme Lima Bernal Date: Tue, 24 Jun 2014 18:05:40 -0300 Subject: [PATCH 2/2] libdvbpsi: patch-1: include c header after extern "C" --- src/libdvbpsi-1.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/libdvbpsi-1.patch b/src/libdvbpsi-1.patch index 639d638d..80159f83 100644 --- a/src/libdvbpsi-1.patch +++ b/src/libdvbpsi-1.patch @@ -4,14 +4,14 @@ See index.html for further information. diff --git a/src/descriptor.h b/src/descriptor.h --- a/src/descriptor.h +++ b/src/descriptor.h -@@ -37,6 +37,7 @@ - #ifndef _DVBPSI_DESCRIPTOR_H_ - #define _DVBPSI_DESCRIPTOR_H_ - -+#include +@@ -41,6 +41,7 @@ #ifdef __cplusplus extern "C" { #endif ++#include + + /***************************************************************************** + * common definitions diff --git a/configure b/configure --- a/configure @@ -67,4 +67,3 @@ diff --git a/src/dvbpsi.c b/src/dvbpsi.c va_end(ap); \ if (err > 0) { \ if (dvbpsi->pf_message) \ -