summaryrefslogtreecommitdiffstats
path: root/modules/gralloc
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2009-07-17 11:14:53 -0700
committerMarco Nelissen <marcone@google.com>2009-07-17 11:15:18 -0700
commit15c9d3af0d8bfb8afe6fb89b420746a139336f0f (patch)
tree79a658903b88433d7a12665bb9ce7222cb1ea725 /modules/gralloc
parent3e1f89bcca78fb5175043c76ff5a9310fae91829 (diff)
downloadhardware_libhardware-15c9d3af0d8bfb8afe6fb89b420746a139336f0f.zip
hardware_libhardware-15c9d3af0d8bfb8afe6fb89b420746a139336f0f.tar.gz
hardware_libhardware-15c9d3af0d8bfb8afe6fb89b420746a139336f0f.tar.bz2
Fix the simulator build.
Diffstat (limited to 'modules/gralloc')
-rw-r--r--modules/gralloc/gralloc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp
index 9928a75..4eb9317 100644
--- a/modules/gralloc/gralloc.cpp
+++ b/modules/gralloc/gralloc.cpp
@@ -179,6 +179,7 @@ static int gralloc_alloc_framebuffer(alloc_device_t* dev,
static int init_pmem_area_locked(private_module_t* m)
{
int err = 0;
+#if HAVE_ANDROID_OS // should probably define HAVE_PMEM somewhere
int master_fd = open("/dev/pmem", O_RDWR, 0);
if (master_fd >= 0) {
@@ -206,6 +207,9 @@ static int init_pmem_area_locked(private_module_t* m)
err = -errno;
}
return err;
+#else
+ return -1;
+#endif
}
static int init_pmem_area(private_module_t* m)