From 588b276355e02c1d278d208e152ea450e603960c Mon Sep 17 00:00:00 2001 Message-Id: <588b276355e02c1d278d208e152ea450e603960c.1713993599.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 26 Apr 2008 15:58:41 +0100 Subject: [PATCH] Various fixes for GCC 2.95 Organization: Straylight/Edgeware From: Richard Kettlewell --- clients/playrtp-alsa.c | 3 ++- configure.ac | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/clients/playrtp-alsa.c b/clients/playrtp-alsa.c index ac8ef7e..3c9b67f 100644 --- a/clients/playrtp-alsa.c +++ b/clients/playrtp-alsa.c @@ -47,9 +47,10 @@ static int playrtp_alsa_supply(void *dst, unsigned supply_nsamples) { unsigned samples_available; + const struct packet *p; pthread_mutex_lock(&lock); - const struct packet *p = playrtp_next_packet(); + p = playrtp_next_packet(); if(p && contains(p, next_timestamp)) { /* This packet is ready to play */ const uint32_t packet_end = p->timestamp + p->nsamples; diff --git a/configure.ac b/configure.ac index 1de3613..7346b9c 100644 --- a/configure.ac +++ b/configure.ac @@ -456,6 +456,9 @@ if test $want_server = yes; then fi AM_CONDITIONAL([SERVER], [test x$want_server = xyes]) +if test $want_gtk = yes; then + AC_DEFINE([WITH_GTK], [1], [define if using GTK+]) +fi if test "x$GCC" = xyes; then # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478 @@ -495,7 +498,12 @@ if test "x$GCC" = xyes; then rjk_cv_werror, [ save_CFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} ${GTK_CFLAGS} -Werror" - AC_TRY_COMPILE([#include ], + AC_TRY_COMPILE([#if WITH_GTK + #include +#endif + +struct s { int a, b; }; +const struct s sv = { .a = 1 };], [], [rjk_cv_werror=yes], [rjk_cv_werror=no]) -- [mdw]