public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: tim.gore@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel-gpu-tools: avoid include of cairo.h on Android builds
Date: Mon, 31 Mar 2014 11:55:40 +0100	[thread overview]
Message-ID: <1396263340-7240-2-git-send-email-tim.gore@intel.com> (raw)
In-Reply-To: <1396263340-7240-1-git-send-email-tim.gore@intel.com>

From: tgore <tim.gore@intel.com>

A recent commit means igt_debugfs.c now needs to include igt_kms.h,
which in turn includes igt_fb.h and hence cairo.h.
We need to avoid this inclusion of cairo.h when building for Android,
(until we have a cairo port) so I have added a #ifndef around it.

Signed-off-by: Tim Gore <tim.gore@intel.com>
---
 lib/Android.mk | 3 ++-
 lib/igt_fb.h   | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/Android.mk b/lib/Android.mk
index 6735255..d4ebef4 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -33,7 +33,8 @@ include $(LOCAL_PATH)/Makefile.sources
 
 skip_lib_list := \
     igt_kms.c \
-    igt_kms.h
+    igt_kms.h \
+    igt_fb.c
 
 lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))
 
diff --git a/lib/igt_fb.h b/lib/igt_fb.h
index 5f0ff51..7242f9b 100644
--- a/lib/igt_fb.h
+++ b/lib/igt_fb.h
@@ -28,7 +28,12 @@
 #ifndef __IGT_FB_H__
 #define __IGT_FB_H__
 
+#ifndef ANDROID
 #include <cairo.h>
+#else
+typedef struct _cairo_surface cairo_surface_t;
+typedef struct _cairo cairo_t;
+#endif
 
 #include <drm_fourcc.h>
 #include <xf86drmMode.h>
-- 
1.9.0

  reply	other threads:[~2014-03-31 10:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 10:55 [PATCH] Avoid include of cairo.h on Android build tim.gore
2014-03-31 10:55 ` tim.gore [this message]
2014-03-31 11:15 ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396263340-7240-2-git-send-email-tim.gore@intel.com \
    --to=tim.gore@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox