• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/busybox


Commit MetaInfo

Révision945092bfb1a805451cfc7e5ad5ce3fa56df10058 (tree)
l'heure2017-09-08 20:30:00
AuteurChih-Wei Huang <cw_huang@asus...>
CommiterChih-Wei Huang

Message de Log

Fix building issues on Android 8.0

Change Summary

Modification

--- a/android/selinux/android_selinux.h
+++ b/android/selinux/android_selinux.h
@@ -133,15 +133,6 @@ extern int selinux_check_passwd_access(access_vector_t requested);
133133
134134 #define selinux_policy_root() "/sepolicy"
135135
136-static int selinux_getenforcemode(int *rc)
137-{
138- if (rc) {
139- *rc = security_getenforce();
140- return 0;
141- }
142- return -1;
143-}
144-
145136 static const char *selinux_file_contexts_path()
146137 {
147138 return "/file_contexts";
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -33,8 +33,10 @@
3333 # if ENABLE_FEATURE_IPV6
3434 # include <netinet/in6.h>
3535 # endif
36-# define ANDROID_CHANGES
3736 # ifdef BIONIC_L
37+# ifndef BIONIC_O
38+# define ANDROID_CHANGES
39+# endif
3840 # include <arpa/nameser.h>
3941 # include <dns/include/resolv_private.h>
4042 # include <dns/resolv/res_private.h>
--- a/selinux/sestatus.c
+++ b/selinux/sestatus.c
@@ -23,6 +23,15 @@ extern char *selinux_mnt;
2323
2424 #define COL_FMT "%-31s "
2525
26+static int internal_selinux_getenforcemode(int *rc)
27+{
28+ if (rc) {
29+ *rc = security_getenforce();
30+ return 0;
31+ }
32+ return -1;
33+}
34+
2635 static void display_boolean(void)
2736 {
2837 char **bools;
@@ -181,7 +190,7 @@ int sestatus_main(int argc UNUSED_PARAM, char **argv)
181190 rc == 0 ? "permissive" : "enforcing");
182191
183192 /* Mode from config file: line */
184- if (selinux_getenforcemode(&rc) != 0)
193+ if (internal_selinux_getenforcemode(&rc) != 0)
185194 goto error;
186195 printf(COL_FMT "%s\n", "Mode from config file:",
187196 rc < 0 ? "disabled" : (rc == 0 ? "permissive" : "enforcing"));