<div dir="ltr">I suppose I should do this to avoid fighting with <linux/types.h><div><br></div><div>#ifdef DRM_FOURCC_STANDALONE<br>#if defined(__linux__)</div><div>#include <linux/types.h><br></div><div>#else<br>#include <stdint.h><br>typedef uint32_t __u32;<br>typedef uint64_t __u64;</div><div>#endif<br>#else<br>#include "drm.h"<br>#endif<br></div><div><br></div><div>I'll wait for more feedback before updating the patch though.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 1:47 AM James Park <<a href="mailto:james.park@lagfreegames.com">james.park@lagfreegames.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The typedefs might also conflict on Linux if DRM_FOURCC_STANDALONE is enabled with whatever LInux declared __u32/__u64 as, but I think the implication is that once DRM_FOURCC_STANDALONE has been declared, that's kind of a promise not to include drm.h.<br><div><br></div><div>I'm fine with this, but I'm not married to it if someone has a problem where they want to define DRM_FOURCC_STANDALONE, but also can't avoid including drm.h for some reason.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Dec 4, 2020 at 12:53 AM Simon Ser <<a href="mailto:contact@emersion.fr" target="_blank">contact@emersion.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Friday, December 4, 2020 5:53 AM, James Park <<a href="mailto:jpark37@lagfreegames.com" target="_blank">jpark37@lagfreegames.com</a>> wrote:<br>
<br>
> +#ifdef DRM_FOURCC_STANDALONE<br>
> +#include <stdint.h><br>
><br>
> +typedef uint32_t __u32;<br>
> +typedef uint64_t __u64;<br>
> +#else<br>
> #include "drm.h"<br>
> +#endif<br>
<br>
C11 allows duplicate typedefs, but older versions of the standard<br>
don't AFAIK. If this is a concern, a solution would be to guard the<br>
typedefs.<br>
</blockquote></div>
</blockquote></div>