Prevent name conflict for eventfd.cpp and eventfd.s when building libc.a
- eventfd.cpp and eventfd.s will output to the same file when building libc.a
out/target/product/*/obj/STATIC_LIBRARIES/libc_intermediates/WHOLE/libc_common_objs/eventfd.o
- And then `eventfd` will undefined when statically linked to libc.
Also add a unit test.
(cherry-pick of 8baa929d5d3bcf63381cf78ba76168c80c303f5e.)
Change-Id: Icd0eb0f4ce0511fb9ec00a504d491afd47d744d3
diff --git a/libc/Android.mk b/libc/Android.mk
index f53fcc8..22ed2d8 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -238,7 +238,8 @@
bionic/brk.cpp \
bionic/dirent.cpp \
bionic/__errno.c \
- bionic/eventfd.cpp \
+ bionic/eventfd_read.cpp \
+ bionic/eventfd_write.cpp \
bionic/__fgets_chk.cpp \
bionic/getauxval.cpp \
bionic/getcwd.cpp \