Index: tools/android/adb_reboot/adb_reboot.c |
diff --git a/tools/android/adb_reboot/adb_reboot.c b/tools/android/adb_reboot/adb_reboot.c |
index 48c5cbe58f251d054aec0ecc087de290c35df829..d414dd5d3583a2c41d9136a0ede88661d700c38e 100644 |
--- a/tools/android/adb_reboot/adb_reboot.c |
+++ b/tools/android/adb_reboot/adb_reboot.c |
@@ -23,7 +23,7 @@ int main(int argc, char ** argv) { |
/* child (daemon) continues */ |
int j; |
- for (j = 0; j < getdtablesize(); j++) |
+ for (j = 0; j < sysconf(_SC_OPEN_MAX); j++) |
close(j); |
setsid(); /* obtain a new process group */ |