summaryrefslogtreecommitdiff
path: root/su
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-10-07 15:19:02 -0700
committerElliott Hughes <enh@google.com>2016-10-08 15:06:52 -0700
commitdee9705c70cd6182c64936ef167779f9209998b0 (patch)
tree045ce09d592e6bc5fbc704fd65a216ee85b05efd /su
parent1607d18122f86274fc617996ea5b8eeca995a048 (diff)
downloadextras-dee9705c70cd6182c64936ef167779f9209998b0.tar.gz
Rely on the platform -std default.
Bug: http://b/32019064 Test: builds Change-Id: I301b223df84ffdea7c93b5c735c859abcc5bb220
Diffstat (limited to 'su')
-rw-r--r--su/Android.mk4
-rw-r--r--su/su.cpp (renamed from su/su.c)2
2 files changed, 3 insertions, 3 deletions
diff --git a/su/Android.mk b/su/Android.mk
index 297e0a31..92ad5e31 100644
--- a/su/Android.mk
+++ b/su/Android.mk
@@ -1,9 +1,9 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_CFLAGS := -std=c11 -Wall -Werror
+LOCAL_CFLAGS := -Wall -Werror
-LOCAL_SRC_FILES:= su.c
+LOCAL_SRC_FILES:= su.cpp
LOCAL_MODULE:= su
diff --git a/su/su.c b/su/su.cpp
index ea61f93d..ee1526ef 100644
--- a/su/su.c
+++ b/su/su.cpp
@@ -137,7 +137,7 @@ int main(int argc, char** argv) {
exec_args[i] = *argv++;
}
// Default to the standard shell.
- if (i == 0) exec_args[i++] = "/system/bin/sh";
+ if (i == 0) exec_args[i++] = const_cast<char*>("/system/bin/sh");
exec_args[i] = NULL;
execvp(exec_args[0], exec_args);