libril: Build non-inlined android_atomic methods
authorKevin F. Haggerty <haggertk@lineageos.org>
Fri, 15 Jun 2018 20:53:38 +0000 (14:53 -0600)
committerJan Altensen <info@stricted.net>
Sat, 7 Aug 2021 23:38:22 +0000 (01:38 +0200)
* All of the libsec-ril*.so libraries reference these symbols, but
  Google finally dropped the non-inlined versions from libcutils with
  Android 8.0. This could be handled with shims in numerous device
  trees, but shim semantics and implementation aren't exactly stable
  and we can handle it more cleanly here in one place.
* See LineageOS/android_system_core@103e8f560

Change-Id: I787372b739f3ace0d9cbbc33e4bffafa6876665e

ril/libril/ril_service.cpp

index ad24bf3c4c3cb292af44923a7cc587f678499aee..9f010aaae898024cc9d29748e5b788288db623bf 100644 (file)
 #include <inttypes.h>
 #include <cutils/properties.h>
 
+#define ANDROID_ATOMIC_INLINE
+extern "C" {
+#include <cutils/atomic.h>
+}
+
 #define INVALID_HEX_CHAR 16
 
 // Enable verbose logging