aboutsummaryrefslogtreecommitdiff
path: root/toys/android/setprop.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/android/setprop.c')
-rw-r--r--toys/android/setprop.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/toys/android/setprop.c b/toys/android/setprop.c
index ef24c9ad..cbcd152b 100644
--- a/toys/android/setprop.c
+++ b/toys/android/setprop.c
@@ -7,6 +7,7 @@ USE_SETPROP(NEWTOY(setprop, "<2>2", TOYFLAG_USR|TOYFLAG_SBIN))
config SETPROP
bool "setprop"
default y
+ depends on TOYBOX_ON_ANDROID
help
usage: setprop NAME VALUE
@@ -16,13 +17,10 @@ config SETPROP
#define FOR_setprop
#include "toys.h"
-#if defined(__ANDROID__)
#include <cutils/properties.h>
-#endif
void setprop_main(void)
{
-#if defined(__ANDROID__)
char *name = toys.optargs[0], *value = toys.optargs[1];
char *p;
size_t name_len = strlen(name), value_len = strlen(value);
@@ -48,5 +46,4 @@ void setprop_main(void)
if (property_set(name, value))
error_msg("failed to set property '%s' to '%s'", name, value);
-#endif
}