mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
pulsecore/packet: avoid redefinition of pa_packet structure
packet.h defines:
typedef struct pa_packet pa_packet;
and packet.c defines:
typedef struct pa_packet {
...
} pa_packet;
With old versions of gcc (such as gcc 4.5) this causes a redefinition
error at compile time:
pulsecore/packet.c:43:3: error: redefinition of typedef 'pa_packet'
pulsecore/packet.h:26:26: note: previous declaration of 'pa_packet' was here
In order to fix this, this commit changes the definition in packet.c
to just:
struct pa_packet {
...
};
This way, the contents of the structure remain opaque to users of
pa_packet outside packet.c, and the 'pa_packet' type remains usable.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91334
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
5504b26e1e
commit
1c5005ef77
1 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#define MAX_APPENDED_SIZE 128
|
||||
|
||||
typedef struct pa_packet {
|
||||
struct pa_packet {
|
||||
PA_REFCNT_DECLARE;
|
||||
enum { PA_PACKET_APPENDED, PA_PACKET_DYNAMIC } type;
|
||||
size_t length;
|
||||
|
|
@ -40,7 +40,7 @@ typedef struct pa_packet {
|
|||
union {
|
||||
uint8_t appended[MAX_APPENDED_SIZE];
|
||||
} per_type;
|
||||
} pa_packet;
|
||||
};
|
||||
|
||||
PA_STATIC_FLIST_DECLARE(packets, 0, pa_xfree);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue