summaryrefslogtreecommitdiff
path: root/package/busybox/patches/patch-include_libbb_h
blob: 37c500bdc329c0adab465845761999a62d01f2af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- busybox-1.13.4.orig/include/libbb.h	2009-04-15 02:09:42.000000000 +0200
+++ busybox-1.13.4/include/libbb.h	2009-05-09 02:06:09.000000000 +0200
@@ -44,6 +44,7 @@
 #define PATH_MAX 256
 #endif
 
+#if !(defined __APPLE__ || defined __FreeBSD__)
 #ifdef HAVE_MNTENT_H
 #include <mntent.h>
 #endif
@@ -58,6 +59,7 @@
 #include <selinux/flask.h>
 #include <selinux/av_permissions.h>
 #endif
+#endif
 
 #if ENABLE_LOCALE_SUPPORT
 #include <locale.h>
@@ -71,9 +73,11 @@
 
 #include <pwd.h>
 #include <grp.h>
+#ifndef HOSTCOMPILE
 #if ENABLE_FEATURE_SHADOWPASSWDS
 # include <shadow.h>
 #endif
+#endif
 
 /* Some libc's forget to declare these, do it ourself */
 
@@ -409,7 +413,9 @@ struct BUG_too_small {
 	char BUG_family_t_too_small[(0
 			| AF_UNSPEC
 			| AF_INET
+#ifndef HOSTCOMPILE
 			| AF_INET6
+#endif
 			| AF_UNIX
 #ifdef AF_PACKET
 			| AF_PACKET
@@ -810,7 +816,9 @@ enum {
 # define bb_daemonize_or_rexec(flags, argv) bb_daemonize_or_rexec(flags)
 # define bb_daemonize(flags)                bb_daemonize_or_rexec(flags, bogus)
 #else
+#ifndef HOSTCOMPILE
   void re_exec(char **argv) NORETURN FAST_FUNC;
+#endif
   void forkexit_or_rexec(char **argv) FAST_FUNC;
   extern bool re_execed;
   int  BUG_fork_is_unavailable_on_nommu(void) FAST_FUNC;
@@ -1003,10 +1011,12 @@ extern void run_applet_and_exit(const ch
 extern void run_applet_no_and_exit(int a, char **argv) NORETURN FAST_FUNC;
 #endif
 
+#if !(defined __APPLE__ || defined __FreeBSD__)
 #ifdef HAVE_MNTENT_H
 extern int match_fstype(const struct mntent *mt, const char *fstypes) FAST_FUNC;
 extern struct mntent *find_mount_point(const char *name, const char *table) FAST_FUNC;
 #endif
+#endif
 extern void erase_mtab(const char * name) FAST_FUNC;
 extern unsigned int tty_baud_to_value(speed_t speed) FAST_FUNC;
 extern speed_t tty_value_to_baud(unsigned int value) FAST_FUNC;
@@ -1084,6 +1094,7 @@ extern void bb_do_delay(int seconds) FAS
 extern void change_identity(const struct passwd *pw) FAST_FUNC;
 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) NORETURN FAST_FUNC;
 extern void run_shell(const char *shell, int loginshell, const char *command, const char **additional_args) FAST_FUNC;
+#if !(defined __APPLE__ || defined __FreeBSD__)
 #if ENABLE_SELINUX
 extern void renew_current_security_context(void) FAST_FUNC;
 extern void set_current_security_context(security_context_t sid) FAST_FUNC;
@@ -1094,6 +1105,7 @@ extern void selinux_preserve_fcontext(in
 #else
 #define selinux_preserve_fcontext(fdesc) ((void)0)
 #endif
+#endif
 extern void selinux_or_die(void) FAST_FUNC;
 extern int restricted_shell(const char *shell) FAST_FUNC;