Disable VK_KHR_external_memory_fd for Android build

Android relies on VK_ANDROID_external_memory_android_hardware_buffer.

Bug: b/158094132
Change-Id: I75498d38fc1d3e5c3a2b21df35fdef32d9f597a0
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50248
Presubmit-Ready: Yiwei Zhang <zzyiwei@google.com>
Reviewed-by: David Turner <digit@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Yiwei Zhang <zzyiwei@google.com>
diff --git a/src/Vulkan/VkConfig.hpp b/src/Vulkan/VkConfig.hpp
index ecb2132..644c3de 100644
--- a/src/Vulkan/VkConfig.hpp
+++ b/src/Vulkan/VkConfig.hpp
@@ -86,9 +86,11 @@
 
 }  // namespace vk
 
-#if defined(__linux__) || defined(__ANDROID__)
+#if defined(__linux__) && !defined(__ANDROID__)
 #	define SWIFTSHADER_EXTERNAL_MEMORY_OPAQUE_FD 1
 #	define SWIFTSHADER_EXTERNAL_SEMAPHORE_OPAQUE_FD 1
+#elif defined(__ANDROID__)
+#	define SWIFTSHADER_EXTERNAL_SEMAPHORE_OPAQUE_FD 1
 #endif
 
 constexpr VkDeviceSize MAX_MEMORY_ALLOCATION_SIZE = 0x40000000ull;  // 0x40000000 = 1 GiB
diff --git a/src/Vulkan/VkDeviceMemory.cpp b/src/Vulkan/VkDeviceMemory.cpp
index 81b10dc..32fad70 100644
--- a/src/Vulkan/VkDeviceMemory.cpp
+++ b/src/Vulkan/VkDeviceMemory.cpp
@@ -170,7 +170,7 @@
 };
 
 #if SWIFTSHADER_EXTERNAL_MEMORY_OPAQUE_FD
-#	if defined(__linux__) || defined(__ANDROID__)
+#	if defined(__linux__) && !defined(__ANDROID__)
 #		include "VkDeviceMemoryExternalLinux.hpp"
 #	else
 #		error "Missing VK_KHR_external_memory_fd implementation for this platform!"