Include sys/system_properties.h in teglAndroidUtil.cpp
authorTim Van Patten <timvp@google.com>
Thu, 18 Mar 2021 22:15:34 +0000 (16:15 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 25 Mar 2021 16:01:59 +0000 (16:01 +0000)
The following CL added a call to __system_property_get():
https://github.com/KhronosGroup/VK-GL-CTS/commit/8a537a0c916e1a10e134f648801f0812c4c749ba

However, it's failing to build:

  ../../third_party/angle/third_party/VK-GL-CTS/src/modules/egl/teglAndroidUtil.cpp:78:3:
  error: use of undeclared identifier '__system_property_get'
                __system_property_get("ro.build.version.sdk", value);

This is caused by teglAndroidUtil.cpp not including
sys/system_properties.h. Including the file fixes the error.

Change-Id: I0e63fcc9dfe0e872832da07e3b8d7f2f78f9d835

modules/egl/teglAndroidUtil.cpp

index 84d3060..2e1ac47 100644 (file)
@@ -59,6 +59,7 @@ namespace
 {
 
 #if defined(__ANDROID_API_O__) && (DE_ANDROID_API >= __ANDROID_API_O__)
+#      include <sys/system_properties.h>
 #      include <android/hardware_buffer.h>
 #      include "deDynamicLibrary.hpp"
 #      define BUILT_WITH_ANDROID_HARDWARE_BUFFER 1