Apply patches for ndk-build to work properly

Auto generated by ndk-busybox-kitchen
This commit is contained in:
topjohnwu 2017-09-05 11:54:53 +08:00
parent 12da53078d
commit c6fae0efd8
16 changed files with 22 additions and 51 deletions

View File

@ -27,16 +27,7 @@ COMMON_FILES:= \
find_list_entry.o \
init_handle.o
DPKG_FILES:= \
unpack_ar_archive.o \
filter_accept_list_reassign.o \
unsafe_prefix.o \
get_header_ar.o \
get_header_tar.o \
get_header_tar_gz.o \
get_header_tar_bz2.o \
get_header_tar_lzma.o \
get_header_tar_xz.o \
DPKG_FILES:=
INSERT

View File

@ -35,26 +35,6 @@
#include "libbb.h"
void FAST_FUNC print_numbered_lines(struct number_state *ns, const char *filename)
{
FILE *fp = fopen_or_warn_stdin(filename);
unsigned N = ns->start;
char *line;
while ((line = xmalloc_fgetline(fp)) != NULL) {
if (ns->all
|| (ns->nonempty && line[0])
) {
printf("%*u%s%s\n", ns->width, N, ns->sep, line);
N += ns->inc;
} else if (ns->empty_str)
fputs(ns->empty_str, stdout);
free(line);
}
fclose(fp);
}
int nl_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int nl_main(int argc UNUSED_PARAM, char **argv)
{

View File

@ -10,6 +10,7 @@
#ifndef LIBBB_H
#define LIBBB_H 1
#include "autoconf.h"
#include "platform.h"
#include <ctype.h>

View File

@ -7,10 +7,10 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
#include "libbb.h"
#if ENABLE_LONG_OPTS || ENABLE_FEATURE_GETOPT_LONG
# include <getopt.h>
#endif
#include "libbb.h"
/* Documentation

View File

@ -24,7 +24,7 @@
#include <sys/syscall.h> /* For __NR_xxx definitions */
#include <stdarg.h>
#include <linux/sem.h>
#include <sys/sem.h>
#include "libbb.h"
#ifndef __NR_semctl

View File

@ -88,6 +88,7 @@
#include <netpacket/packet.h>
#include <netinet/ether.h>
#include <linux/if.h>
#include <net/ethernet.h>
/* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to
* work as non-root, but we need SOCK_PACKET to specify the Ethernet
@ -131,7 +132,7 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr)
eap = ether_aton_r(hostid, eaddr);
if (eap) {
bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eap));
#if !defined(__UCLIBC__) || UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 30)
#if !defined(__BIONIC__) && !defined(__UCLIBC__) || UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 30)
} else if (ether_hostton(hostid, eaddr) == 0) {
bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr));
#endif

View File

@ -6,6 +6,7 @@
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/if_ether.h>
#if !defined IFA_RTA
#include <linux/if_addr.h>
#endif

View File

@ -13,6 +13,7 @@
#include "utils.h"
#include <netinet/if_ether.h>
#include <linux/if_ether.h>
/* Please conditionalize exotic protocols on CONFIG_something */

View File

@ -26,7 +26,7 @@
#undef USE_SEED
/* pstm: multiprecision numbers */
#undef DISABLE_PSTM
#if defined(__GNUC__) && defined(__i386__)
#if defined(__GNUC__) && defined(__i386__) && !defined(__ANDROID__)
/* PSTM_X86 works correctly. +25 bytes. */
# define PSTM_32BIT
# define PSTM_X86

View File

@ -299,12 +299,15 @@
#define TRACEROUTE_SO_DEBUG 0
#include "libbb.h"
#include <net/if.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <net/ethernet.h>
#if ENABLE_FEATURE_IPV6
# include <netinet/ip6.h>
# include <netinet/icmp6.h>
@ -313,7 +316,6 @@
# endif
#endif
#include "libbb.h"
#include "inet_common.h"
#ifndef IPPROTO_ICMP

View File

@ -5,6 +5,8 @@
#ifndef UDHCP_DHCPD_H
#define UDHCP_DHCPD_H 1
#include <net/ethernet.h>
PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
/* Defaults you may want to tweak */

View File

@ -61,6 +61,7 @@
#include <net/if.h>
#include <net/if_arp.h>
#include <linux/sockios.h>
#include <net/ethernet.h>
#include "struct-etherarp.h"
#include <syslog.h>

View File

@ -47,11 +47,6 @@
#include <sys/cdefs.h>
//#include <sys/_types.h>
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
struct stat;
typedef struct {
size_t gl_pathc; /* Count of total paths so far. */
@ -74,7 +69,6 @@ typedef struct {
int (*gl_stat)(const char *, struct stat *);
} glob_t;
#if __POSIX_VISIBLE >= 199209
/* Believed to have been introduced in 1003.2-1992 */
#define GLOB_APPEND 0x0001 /* Append to output from previous call. */
#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */
@ -89,9 +83,7 @@ typedef struct {
#define GLOB_ABORTED (-2) /* Unignored error. */
#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */
#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */
#endif /* __POSIX_VISIBLE >= 199209 */
#if __BSD_VISIBLE
#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */
#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */
#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */
@ -103,7 +95,6 @@ typedef struct {
/* source compatibility, these are the old names */
#define GLOB_MAXPATH GLOB_LIMIT
#define GLOB_ABEND GLOB_ABORTED
#endif /* __BSD_VISIBLE */
__BEGIN_DECLS
int glob(const char *, int, int (*)(const char *, int), glob_t *);

View File

@ -121,10 +121,10 @@
//usage: " esac\n"
//usage: "done\n"
#include "libbb.h"
#if ENABLE_FEATURE_GETOPT_LONG
# include <getopt.h>
#endif
#include "libbb.h"
/* NON_OPT is the code that is returned when a non-option is found in '+'
mode */

View File

@ -33,9 +33,9 @@
/* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
/* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
#include <sys/ipc.h>
#include <linux/shm.h>
#include <linux/msg.h>
#include <linux/sem.h>
#include <sys/shm.h>
#include <sys/msg.h>
#include <sys/sem.h>
#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \
defined(__ANDROID__)

View File

@ -40,9 +40,9 @@
/* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */
#include <sys/types.h>
#include <sys/ipc.h>
#include <linux/sem.h>
#include <linux/msg.h>
#include <linux/shm.h>
#include <sys/sem.h>
#include <sys/msg.h>
#include <sys/shm.h>
#include "libbb.h"