From: Sumit Semwal <sumit.sem...@linaro.org> This is a forward port of a patch from the AOSP/master tree: https://android.googlesource.com/platform/external/mesa3d/+/bd30b663f55f8af73a0be4446349c5a2d4c641b0%5E%21/
Since https://android-review.googlesource.com/c/718518 added timespec_get() to bionic, mesa3d doesn't build due to redefinition of timespec_get(). Avoid redefinition by defining HAVE_TIMESPEC_GET flag. Test: build and boot tested db820c to UI. Change-Id: I3dcc8034b48785e45cd3fa50e4d9cf2c684694a0 Cc: Rob Herring <rob.herr...@linaro.org> Cc: Alistair Strachan <astrac...@google.com> Cc: Marissa Wall <maris...@google.com> Cc: Sumit Semwal <sumit.sem...@linaro.org> Cc: Emil Velikov <emil.l.veli...@gmail.com> Cc: Rob Clark <robdcl...@gmail.com> Reviewed-by: Emil Velikov <emil.veli...@collabora.com> Signed-off-by: Sumit Semwal <sumit.sem...@linaro.org> Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: Conditionalize it for PLATFORM_VERSION Q and higher v3: Rework conditionalization to numbered releases prior to P (9.0) --- Android.common.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Android.common.mk b/Android.common.mk index 397dc03..619b216 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -89,6 +89,13 @@ LOCAL_CPPFLAGS += \ LOCAL_CONLYFLAGS += \ -std=c99 +# c11 timespec_get is part of bionic as well +# https://android-review.googlesource.com/c/718518 +# This means releases from P and earlier won't need this +ifeq ($(filter 5 6 7 8 9, $(MESA_ANDROID_MAJOR_VERSION)),) +LOCAL_CFLAGS += -DHAVE_TIMESPEC_GET +endif + ifeq ($(strip $(MESA_ENABLE_ASM)),true) ifeq ($(TARGET_ARCH),x86) LOCAL_CFLAGS += \ -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev