summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-09-02 14:11:52 +0200
committerColin Guthrie <colin@mageia.org>2011-09-03 12:17:28 +0200
commit9133c6c9359b6f22b25176fbd2c435a21590230c (patch)
tree41a6b8f6083a88c99d88f168ece95b3a28803d7b
parentdfd706da71322c03a958cb5994bdb72953eaffa3 (diff)
Make gcc --std=c99 happy
We're now more or less C99 compliant
-rw-r--r--src/modules/echo-cancel/adrian-aec.c4
-rw-r--r--src/modules/module-rygel-media-server.c1
-rw-r--r--src/pulsecore/flist.c2
-rw-r--r--src/pulsecore/macro.h4
-rw-r--r--src/tests/alsa-time-test.c4
5 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/echo-cancel/adrian-aec.c b/src/modules/echo-cancel/adrian-aec.c
index e969e8c56..1476ee4f8 100644
--- a/src/modules/echo-cancel/adrian-aec.c
+++ b/src/modules/echo-cancel/adrian-aec.c
@@ -10,6 +10,10 @@
* Version 0.4 Leaky Normalized LMS - pre whitening algorithm
*/
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <math.h>
#include <string.h>
#include <stdint.h>
diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c
index 9af0cebbb..94b2d689b 100644
--- a/src/modules/module-rygel-media-server.c
+++ b/src/modules/module-rygel-media-server.c
@@ -37,6 +37,7 @@
#include <pulsecore/source.h>
#include <pulsecore/core-util.h>
#include <pulsecore/log.h>
+#include <pulsecore/macro.h>
#include <pulsecore/modargs.h>
#include <pulsecore/dbus-shared.h>
#include <pulsecore/namereg.h>
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index acdeff384..d279271cb 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
@@ -53,7 +53,7 @@ struct pa_flist {
pa_atomic_ptr_t stored;
/* Stack that contains empty list elements */
pa_atomic_ptr_t empty;
- pa_flist_elem table[0];
+ pa_flist_elem table[];
};
/* Lock free pop from linked list stack */
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index 1207a1082..7459e6f19 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
@@ -84,6 +84,10 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
#define PA_DECLARE_ALIGNED(n,t,v) t v
#endif
+#ifdef __GNUC__
+#define typeof __typeof__
+#endif
+
/* The users of PA_MIN and PA_MAX, PA_CLAMP, PA_ROUND_UP should be
* aware that these macros on non-GCC executed code with side effects
* twice. It is thus considered misuse to use code with side effects
diff --git a/src/tests/alsa-time-test.c b/src/tests/alsa-time-test.c
index 1a572b30d..ab194ee44 100644
--- a/src/tests/alsa-time-test.c
+++ b/src/tests/alsa-time-test.c
@@ -1,3 +1,7 @@
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
#include <assert.h>
#include <inttypes.h>
#include <time.h>