[Android Q&A, Help & Troubleshooting] :
[MENTION=6622051]Startrek852[/MENTION] [MENTION=5585603]Quasar[/MENTION] [MENTION=5321417]MasterAwesome[/MENTION]

Could someone point me out how to fix this :

Starting build with ninja
ninja: Entering directory `.'
[ 1% 193/13787] host C: libcutils <= system/core/libcutils/fs_config.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang -I device/motorola/msm8952-common/include -I system/core/libcutils -I /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates -I /home/yeshwanthvshenoy/aosp/out/host/linux-x86/gen/STATIC_LIBRARIES/libcutils_intermediates -I libnativehelper/include/nativehelper \$(cat /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -target x86_64-linux-gnu -std=gnu99 -Werror -Wall -Wextra -fPIC -D_USING_LIBCXX -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.d -o /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.o system/core/libcutils/fs_config.c ) && (cp /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.d /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.d >> /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.P; rm -f /home/yeshwanthvshenoy/aosp/out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/fs_config.d )"
system/core/libcutils/fs_config.c:142:44: error: implicit declaration of function 'CAP_MASK_LONG' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
{ 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | CAP_MASK_LONG(CAP_SETGID), "system/bin/run-as" },
^
system/core/libcutils/fs_config.c:142:44: error: initializer element is not a compile-time constant
{ 00750, AID_ROOT, AID_SHELL, CAP_MASK_LONG(CAP_SETUID) | CAP_MASK_LONG(CAP_SETGID), "system/bin/run-as" },
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
[ 1% 193/13787] host C++: libc++abi <= external/libcxxabi/src/cxa_demangle.cpp
ninja: build stopped: subcommand failed.
build/core/ninja.mk:148: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (38 seconds) ####

Sources based off nougat branch on the F-AOSP

Device is Moto G4 Plus (Athene)

I realize the function call is made even before the definition but can't seem to find out where it is being called. Any help?