Skip to contentSkip to conversation

Avoid include of cairo.h on Android build

PATCH In review [email protected] 2 participants 3 messages Mar 31, 2014 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid include of cairo.h on Android build

From: tgore <[email protected]>

This is a rework of the third patch in a previous series of 3, to accomodate a simplification suggested by Daniel Vetter.

tgore (1):
intel-gpu-tools: avoid include of cairo.h on Android builds

 lib/Android.mk | 3 ++-
 lib/igt_fb.h   | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.0
#1 lore raw

PATCH 1/1 intel-gpu-tools: avoid include of cairo.h on Android builds

From: tgore <[email protected]>

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.

---
 lib/Android.mk | 3 ++-
 lib/igt_fb.h   | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)
lib/Android.mk +2 -1
index 6735255..d4ebef4 100644
@@ -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))
 
lib/igt_fb.h +5 -0
index 5f0ff51..7242f9b 100644
@@ -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>
Signature · 1 line
1.9.0