[Nexus 4 Original Android Development] Maxr1998:
Currently trying to build in AOSP master, get the following error:

FAILED: out/target/product/mako/obj/SHARED_LIBRARIES/libexternal_intermediates/external.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-3688880/bin/clang++	-I hardware/qcom/display/msm8960/libgralloc -I hardware/qcom/display/msm8960/liboverlay -I hardware/qcom/display/msm8960/libcopybit -I hardware/qcom/display/msm8960/libqdutils -I hardware/qcom/display/msm8960/libhwcomposer -I hardware/qcom/display/msm8960/libexternal -I hardware/qcom/display/msm8960/libqservice -I hardware/qcom/display/msm8960/libexternal -I out/target/product/mako/obj/SHARED_LIBRARIES/libexternal_intermediates -I out/target/product/mako/gen/SHARED_LIBRARIES/libexternal_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/mako/obj/SHARED_LIBRARIES/libexternal_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -isystem frameworks/av/include -isystem out/target/product/mako/obj/include -isystem hardware/qcom/msm8960/kernel-headers -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/uapi -c -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=krait -D__ARM_FEATURE_LPAE=1 -mfpu=neon-vfpv4 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -fvisibility-inlines-hidden -std=gnu++14 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -DDEBUG_CALC_FPS -Wno-missing-field-initializers -Werror -Wno-unused-parameter -D__ARM_HAVE_NEON -DLOG_TAG=\\\"qdexternal\\\" -fPIC -D_USING_LIBCXX -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF out/target/product/mako/obj/SHARED_LIBRARIES/libexternal_intermediates/external.d -o out/target/product/mako/obj/SHARED_LIBRARIES/libexternal_intermediates/external.o hardware/qcom/display/msm8960/libexternal/external.cpp"
In file included from hardware/qcom/display/msm8960/libexternal/external.cpp:24:
In file included from frameworks/av/include/media/IAudioPolicyService.h:27:
In file included from frameworks/av/include/media/AudioSystem.h:21:
In file included from frameworks/av/include/media/AudioPolicy.h:23:
frameworks/native/include/binder/Parcel.h:23:10: fatal error: 'android-base/unique_fd.h' file not found
#include <android-base/unique_fd.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

What could be the issue here? I did clone all the qcom repositories. Is there anything out-of-date maybe?

EDIT: Fixed it by adding

common_includes += system/core/base/include

to hardware/qcom/display/msm8960/common.mk.

Now I get

system/bt/stack/btm/btm_inq.cc:855:25: error: assigning to 'btm_inq_state' from incompatible type 'int'
p_inq->next_state += 1;