diff options
| author | Benjamin Legrand <android@legrand.ws> | 2017-09-10 14:49:36 +0200 |
|---|---|---|
| committer | Shreps <shr3ps@gmail.com> | 2017-09-12 10:22:25 +0200 |
| commit | b800cb2d927f37b976867a401ee910d4dde47533 (patch) | |
| tree | 64b6d68ba753dcd8f59bf8d2ddb87c859f5ea4a0 | |
| parent | ba66415ced2e77f054b793769361d4c316e20845 (diff) | |
A6020: Add atomic lib for missing android_atomic_acquire_load
https://review.lineageos.org/#/c/188451/
Change-Id: I064cde4c4c5351f5702ff3e595261b01283c3088
| -rw-r--r-- | libshims/Android.mk | 9 | ||||
| -rw-r--r-- | libshims/lenovo_atomic.cpp | 21 | ||||
| -rw-r--r-- | product/qcom-camera.mk | 4 |
3 files changed, 33 insertions, 1 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk index bc7cb33..e505966 100644 --- a/libshims/Android.mk +++ b/libshims/Android.mk @@ -33,3 +33,12 @@ LOCAL_MODULE := libshim_gui LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := lenovo_atomic.cpp +LOCAL_SHARED_LIBRARIES := libcutils +LOCAL_MODULE := libshim_atomic +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SHARED_LIBRARY) diff --git a/libshims/lenovo_atomic.cpp b/libshims/lenovo_atomic.cpp new file mode 100644 index 0000000..3a159e2 --- /dev/null +++ b/libshims/lenovo_atomic.cpp @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2017 The LineageOS Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <string> +#define ANDROID_ATOMIC_INLINE +extern "C" { +#include <cutils/atomic.h> +} diff --git a/product/qcom-camera.mk b/product/qcom-camera.mk index 0ac4214..0ac43d1 100644 --- a/product/qcom-camera.mk +++ b/product/qcom-camera.mk @@ -5,7 +5,9 @@ PRODUCT_PACKAGES += \ camera.msm8916 \ libbson \ libshim_gui \ - Snap + libshim_atomic \ + Snap \ +# libboringssl-compat \ # libboringssl-compat |
