chiark / gitweb /
Various fixes for GCC 2.95
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 26 Apr 2008 14:58:41 +0000 (15:58 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 26 Apr 2008 14:58:41 +0000 (15:58 +0100)
clients/playrtp-alsa.c
configure.ac

index ac8ef7e7734830226f4f3c8712f5bd2a7a07a06f..3c9b67f9d64e9ac536a8fd55fff79ac442d042f9 100644 (file)
 static int playrtp_alsa_supply(void *dst,
                                unsigned supply_nsamples) {
   unsigned samples_available;
 static int playrtp_alsa_supply(void *dst,
                                unsigned supply_nsamples) {
   unsigned samples_available;
+  const struct packet *p;
 
   pthread_mutex_lock(&lock);
 
   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;
   if(p && contains(p, next_timestamp)) {
     /* This packet is ready to play */
     const uint32_t packet_end = p->timestamp + p->nsamples;
index 1de3613ff903daa6601b4a0294fa0b0a51ab4d5e..7346b9c72485815363c22b262bbe16152be3b320 100644 (file)
@@ -456,6 +456,9 @@ if test $want_server = yes; then
 fi
 
 AM_CONDITIONAL([SERVER], [test x$want_server = xyes])
 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
 
 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"
                    rjk_cv_werror, [
       save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} ${GTK_CFLAGS} -Werror"
-      AC_TRY_COMPILE([#include <gtk/gtk.h>],
+      AC_TRY_COMPILE([#if WITH_GTK
+ #include <gtk/gtk.h>
+#endif
+
+struct s { int a, b; };
+const struct s sv = { .a = 1 };],
                     [],
                     [rjk_cv_werror=yes],
                     [rjk_cv_werror=no])
                     [],
                     [rjk_cv_werror=yes],
                     [rjk_cv_werror=no])