blob: 859941633dfd36f5d4a91102a9bcff42281d0e24 [file] [log] [blame]
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +02001/* vi: set sw=4 ts=4: */
2/*
3 Copyright 2010, Dylan Simon
4
5 Licensed under the GPL v2 or later, see the file LICENSE in this tarball.
6*/
7
8#ifndef BB_ANDROID_H
9#define BB_ANDROID_H 1
10
11/* for dirname, basename */
12#include <libgen.h>
13
14#if ENABLE_FEATURE_DC_LIBM
15# include <math.h>
16#endif
17
18#define killpg_busybox(P, S) kill(-(P), S)
19
20#define setmntent fopen
21#define endmntent fclose
22
23/* defined in bionic/utmp.c */
24void endutent(void);
25
26/* defined in bionic/mktemp.c */
27char *mkdtemp(char *);
28
29/* defined in bionic/stubs.c */
30char *ttyname(int);
31
32/* added to SYSCALLS.TXT:
33int stime(time_t *) 25
34int swapon(const char *, int) 87
35int swapoff(const char *) 115
36*/
Tanguy Pruvot6fef6a32012-05-05 15:26:43 +020037int stime(time_t *);
38int swapon(const char *, int);
39int swapoff(const char *);
40int getsid(pid_t);
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020041
42/* local definition in libbb/xfuncs_printf.c */
43int fdprintf(int fd, const char *format, ...);
44
45/* local definitions in libbb/android.c */
46int ttyname_r(int, char *, size_t);
47
48char *getusershell(void);
49void setusershell(void);
50void endusershell(void);
51
52struct mntent;
53struct __sFILE;
54int addmntent(struct __sFILE *, const struct mntent *);
55struct mntent *getmntent_r(struct __sFILE *fp, struct mntent *mnt, char *buf, int buflen);
56const char *hasmntopt(const struct mntent *, const char *);
57
58#define MNTOPT_NOAUTO "noauto"
59
60/* bionic's vfork is rather broken; for now a terrible bandaid: */
61#define vfork fork
62
Tanguy Pruvot8a6c2c22012-04-28 00:24:09 +020063#define _SOCKLEN_T_DECLARED
64typedef int socklen_t;
65
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020066#endif