OSDN Git Service

minigbm: Compile with large file support
authorRicky Liang <jcliang@chromium.org>
Sat, 29 Oct 2016 07:37:45 +0000 (15:37 +0800)
committerchrome-bot <chrome-bot@chromium.org>
Wed, 9 Nov 2016 17:41:31 +0000 (09:41 -0800)
On device with 32-bit userspace on 64-bit kernel we need to make
sure mmap64 is used to import buffer, or the call may fail because
of invalid offset.

BUG=None
TEST=Use libgbm to import drm_gralloc buffer on Elm.

Change-Id: I1b70d105e6f135d8fa534fb99cad266eed910ea9
Reviewed-on: https://chromium-review.googlesource.com/405147
Commit-Ready: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Makefile

index ccc26c7..de4fed1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ PC_CFLAGS := $(shell $(PKG_CONFIG) --cflags $(PC_DEPS))
 PC_LIBS := $(shell $(PKG_CONFIG) --libs $(PC_DEPS))
 
 CPPFLAGS += -std=c99 -D_GNU_SOURCE=1
-CFLAGS += -Wall -Wsign-compare -Wpointer-arith -Wcast-qual -Wcast-align
+CFLAGS += -Wall -Wsign-compare -Wpointer-arith -Wcast-qual -Wcast-align \
+         -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
 
 ifdef DRV_AMDGPU
        CFLAGS += $(shell $(PKG_CONFIG) --cflags libdrm_amdgpu)