Compile fts.c in libc_openbsd_ndk

fts.c is from openbsd and has compatibility macros to make it compile
as part of bionic.  Move it into libc_openbsd_ndk where it will
get the workarounds from -include openbsd-compat.h instead.

Test: m libc
Change-Id: I213d423af8f010e39460b611e902acbf3561ae7a
diff --git a/libc/Android.bp b/libc/Android.bp
index fbf7ec2..4f5089e 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -24,7 +24,6 @@
     "bionic/ether_aton.c",
     "bionic/ether_ntoa.c",
     "bionic/exit.cpp",
-    "bionic/fts.c",
     "bionic/initgroups.c",
     "bionic/isatty.c",
     "bionic/sched_cpualloc.c",
@@ -565,6 +564,10 @@
         "upstream-openbsd/lib/libc/string/strxfrm.c",
         "upstream-openbsd/lib/libc/string/wcslcpy.c",
         "upstream-openbsd/lib/libc/string/wcswidth.c",
+
+        // This file is originally from OpenBSD, and benefits from
+        // being compiled with openbsd-compat.h.
+        "bionic/fts.c",
     ],
 
     cflags: [
diff --git a/libc/bionic/fts.c b/libc/bionic/fts.c
index 77b4117..dc5ed6b 100644
--- a/libc/bionic/fts.c
+++ b/libc/bionic/fts.c
@@ -54,11 +54,6 @@
 static u_short	 fts_stat(FTS *, FTSENT *, int, int);
 static int	 fts_safe_changedir(FTS *, FTSENT *, int, const char *);
 
-/* Android: OpenBSD source compatibility workarounds. */
-#include "private/bsd_sys_param.h"
-#define DEF_WEAK(s) /* nothing */
-void* recallocarray(void*, size_t, size_t, size_t);
-
 #define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
 
 #define	CLR(opt)	(sp->fts_options &= ~(opt))