Bug 79986 - compiler error on AIX in xcb_in.c:339: '_xcb_in' has no member named 'reqevents'
Summary: compiler error on AIX in xcb_in.c:339: '_xcb_in' has no member named 'reqevents'
Status: RESOLVED FIXED
Alias: None
Product: XCB
Classification: Unclassified
Component: Library (show other bugs)
Version: 1.9.3
Hardware: Other All
: medium normal
Assignee: xcb mailing list dummy
QA Contact: xcb mailing list dummy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-13 14:18 UTC by Michael Haubenwallner
Modified: 2014-06-14 15:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for libxcb master (968 bytes, patch)
2014-06-13 14:22 UTC, Michael Haubenwallner
Details | Splinter Review

Description Michael Haubenwallner 2014-06-13 14:18:41 UTC
Compiling libxcb-1.9.3 on AIX leads to this compiler error (occurs on multiple line numbers):
/tools/haubi/gentoo/sauxz6/var/tmp/portage/x11-libs/libxcb-1.9.3-r1/work/libxcb-1.9.3/src/xcb_in.c: In function 'get_event':
/tools/haubi/gentoo/sauxz6/var/tmp/portage/x11-libs/libxcb-1.9.3-r1/work/libxcb-1.9.3/src/xcb_in.c:339: error: '_xcb_in' has no member named 'reqevents'

While the declaration itself actually is:
  typedef struct _xcb_in {
    ...
    struct event_list *events;
    ...
  } _xcb_in;

Now, <sys/poll.h> does "#define events reqevents", so this is where the name 'reqevents' comes from.

However, in xcb_in.c, <sys/poll.h> is included /after/ "xcbint.h", so the struct _xcb_in declaration itself does not have 'events' redefined yet, while the code later in xcb.in.c does have.
Comment 1 Michael Haubenwallner 2014-06-13 14:22:59 UTC
Created attachment 100981 [details] [review]
patch for libxcb master

The fix here is to include local header files after any system header file.
Comment 2 Alan Coopersmith 2014-06-14 15:28:12 UTC
Thanks for the patch - reviewed & pushed to git master:

To ssh://git.freedesktop.org/git/xcb/libxcb
   bc5a104..1251354  master -> master


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.