Bug 91334 - redefinition of typedef pa_packet
Summary: redefinition of typedef pa_packet
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-14 05:06 UTC by blahblah676
Modified: 2015-11-17 13:29 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description blahblah676 2015-07-14 05:06:40 UTC
When building with gcc 4.4.7, this error occurs (due to a change in behaviour in later versions of gcc, which let you redefine typedefs without an error as long as you don't change the definition):

pulsecore/packet.c:43: error: redefinition of typedef ‘pa_packet’
pulsecore/packet.h:26: note: previous declaration of ‘pa_packet’ was here

Fix is to remove the typedef from packet.c and just define the struct:

struct pa_packet {
    PA_REFCNT_DECLARE;
    enum { PA_PACKET_APPENDED, PA_PACKET_DYNAMIC } type;
    size_t length;
    uint8_t *data;
    union {
        uint8_t appended[MAX_APPENDED_SIZE];
    } per_type;
};
Comment 1 Thomas Petazzoni 2015-11-17 12:07:35 UTC
Patch submitted at http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-November/024785.html.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.