Bug 25881

Summary: drm.h , drm_mode.h and <driver>_drm.h use types defined stdint.h but do not include stdint.h
Product: DRI Reporter: Paul Bender <pebender>
Component: libdrmAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: b.brachaczek, leio, xavier
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Paul Bender 2010-01-03 21:36:07 UTC
drm.h, drm_mode.h and (at least some <driver>_drm.h files use the types int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t and uint64_t. Per c99, these are defined in stdint.h. However, the drm.h, drm_mode.h and <driver>_drm.h files do not include stdint.h. As a result, it causes build problems with newer gcc compile versions and files that include one of these without first including stdint.h or a header file that includes stdint.h (eg xf86drm.h). For example, it breaks compilation of the xf86-video-openchrome-0.2.904 driver.

As the use in drm.h is for to non-Linux systems and the use in drm_mode.h was added after 2.4.16, and many files include xf86drm.h before the other headers. Therefore, the problem is not likely to show up too often.
Comment 1 Mart Raudsepp 2010-03-29 08:20:19 UTC
Bug 26994 has a patch for the drm_mode.h case
Comment 2 Kristian Høgsberg 2010-05-12 10:44:21 UTC
drm.h and drm_mode.h are fixed in git now.  If the use of stdint in $driver_drm.h breaks anything, please file bugs against those drivers to get them to use __u32 etc.

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.