[Cogl] [PATCH] kms: include stddef.h before drm.h

Robert Bragg robert at sixbynine.org
Thu Feb 20 10:20:01 PST 2014


Sorry for the delay in replying to this.

I guess this implies that drm.h should really be including stddef.h.

If that's the case then it might be good if you can look at sending a
patch to libdrm for this, but for now I'm happy to land this as a
workaround in cogl.

I've pushed this patch to master and the 1.18 branch.

Thanks.
Robert

On Tue, Jan 28, 2014 at 7:07 PM, Andreas Oberritter <obi at saftware.de> wrote:
> Not doing so leads to the following error, if stddef.h is not included
> indirectly through EGL headers:
>
> | libdrm/drm.h:132:2: error: unknown type name 'size_t'
> |   size_t name_len;   /**< Length of name buffer */
>
> Signed-off-by: Andreas Oberritter <obi at saftware.de>
> ---
>  cogl/winsys/cogl-winsys-egl-kms.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
> index f7c9cfb..144ad9b 100644
> --- a/cogl/winsys/cogl-winsys-egl-kms.c
> +++ b/cogl/winsys/cogl-winsys-egl-kms.c
> @@ -40,6 +40,7 @@
>
>  #include <EGL/egl.h>
>  #include <EGL/eglext.h>
> +#include <stddef.h>
>  #include <drm.h>
>  #include <xf86drm.h>
>  #include <xf86drmMode.h>
> --
> 1.8.3.2
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list