diff options
author | Maarten Bosmans <mkbosmans@gmail.com> | 2011-09-02 14:11:52 +0200 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2011-09-03 12:17:28 +0200 |
commit | 9133c6c9359b6f22b25176fbd2c435a21590230c (patch) | |
tree | 41a6b8f6083a88c99d88f168ece95b3a28803d7b | |
parent | dfd706da71322c03a958cb5994bdb72953eaffa3 (diff) |
Make gcc --std=c99 happy
We're now more or less C99 compliant
-rw-r--r-- | src/modules/echo-cancel/adrian-aec.c | 4 | ||||
-rw-r--r-- | src/modules/module-rygel-media-server.c | 1 | ||||
-rw-r--r-- | src/pulsecore/flist.c | 2 | ||||
-rw-r--r-- | src/pulsecore/macro.h | 4 | ||||
-rw-r--r-- | src/tests/alsa-time-test.c | 4 |
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 e969e8c5..1476ee4f 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 9af0cebb..94b2d689 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 acdeff38..d279271c 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 1207a108..7459e6f1 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 1a572b30..ab194ee4 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> |