[Miscellaneous Android Development] mornage:
OK, the above errors were my fault. I had changed a file when I had previous build issues.

I have now changed the file back but now get other errors.

The Android.mk file in kernel/allwinner/a10/modules/wifi/apm/unifi-linux/os_linux has 4 ALL_PREBUILT entries that make does not like. I changed these entries to PRODUCT_COPY_FILES but then get an error "the following variables have been changed: PRODUCT_COPY_FILES"

Renaming this file allows the build to go further, but fails with the following error:

In file included from <command-line>:0:
./system/core/include/arch/linux-arm/AndroidConfig.h:209:1: warning: "__linux__" redefined
<built-in>: warning: this is the location of the previous definition
In file included from frameworks/base/include/utils/FileMap.h:25,
from frameworks/base/include/utils/Tokenizer.h:22,
from frameworks/base/include/utils/PropertyMap.h:23,
from frameworks/base/include/ui/Keyboard.h:23,
from frameworks/base/libs/ui/KeyLayoutMap.cpp:21:
frameworks/base/include/utils/Compat.h:25:2: error: #error "_FILE_OFFSET_BITS < 64; large files are not supported on this platform"
In file included from frameworks/base/include/utils/FileMap.h:25,
from frameworks/base/include/utils/Tokenizer.h:22,
from frameworks/base/include/utils/PropertyMap.h:23,
from frameworks/base/include/ui/Keyboard.h:23,
from frameworks/base/libs/ui/KeyLayoutMap.cpp:21:
frameworks/base/include/utils/Compat.h:28: error: conflicting declaration 'typedef off_t off64_t'
bionic/libc/include/sys/types.h:70: error: 'off64_t' has a previous declaration as 'typedef loff_t off64_t'
frameworks/base/include/utils/Compat.h: In function 'off64_t lseek64(int, off64_t, int)':
frameworks/base/include/utils/Compat.h:30: error: 'off64_t lseek64(int, off64_t, int)' was declared 'extern' and later 'static'
bionic/libc/include/unistd.h:132: error: previous declaration of 'off64_t lseek64(int, off64_t, int)'
frameworks/base/include/utils/Compat.h: In function 'ssize_t pread64(int, void*, size_t, off64_t)':
frameworks/base/include/utils/Compat.h:35: error: 'ssize_t pread64(int, void*, size_t, off64_t)' was declared 'extern' and later 'static'
bionic/libc/include/unistd.h:137: error: previous declaration of 'ssize_t pread64(int, void*, size_t, off64_t)'
make: *** [out/target/product/a10/obj/SHARED_LIBRARIES/libui_intermediates/KeyLayoutMap.o] Error 1
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/a10/obj/EXECUTABLES/recovery_intermediates/recovery.o: in function main:bootable/recovery/recovery.c:919: error: undefined reference to 'android_reboot'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/a10/obj/EXECUTABLES/recovery_intermediates/recovery.o: in function main:bootable/recovery/recovery.c:923: error: undefined reference to 'android_reboot'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/a10/obj/EXECUTABLES/recovery_intermediates/ui.o: in function input_callback:bootable/recovery/ui.c:422: error: undefined reference to 'android_reboot'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/a10/obj/EXECUTABLES/recovery_intermediates/extendedcommands.o: in function show_advanced_menu:bootable/recovery/extendedcommands.c:932: error: undefined reference to 'android_reboot'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/a10/obj/STATIC_LIBRARIES/libbusybox_intermediates/libbusybox.a(mktemp.o): in function mktemp_main:external/busybox/debianutils/mktemp.c:94: warning: warning: tempnam() possibly used unsafely; consider using mkstemp()
collect2: ld returned 1 exit status
make: *** [out/target/product/a10/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery] Error 1
INSTALL include/asm-generic (34 files)
INSTALL include/mtd (5 files)
INSTALL include/linux/byteorder (2 files)
INSTALL include/drm (14 files)
INSTALL include/linux/can (4 files)
INSTALL include/rdma (1 file)
INSTALL include/scsi/fc (4 files)
INSTALL include/linux/hdlc (1 file)
INSTALL include/linux/dvb (8 files)
INSTALL include/sound (8 files)
INSTALL include/scsi (3 files)
INSTALL include/video (3 files)
INSTALL include/linux/isdn (1 file)
INSTALL include/xen (1 file)
INSTALL include (0 file)
INSTALL include/linux/netfilter (64 files)
INSTALL include/linux/netfilter_arp (2 files)
INSTALL include/linux/netfilter_bridge (16 files)
INSTALL include/linux/netfilter_ipv4 (14 files)
INSTALL include/linux/netfilter_ipv6 (11 files)
INSTALL include/linux/nfsd (6 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (6 files)
INSTALL include/linux/tc_ematch (4 files)
INSTALL include/linux/usb (8 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/linux (361 files)
INSTALL include/asm (32 files)
make[1]: Leaving directory `/home/orange/CM9/kernel/allwinner/a10'