summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm3
-rw-r--r--iPhonePrivate.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 6121e6e..9596309 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -102,6 +102,7 @@
#include <sys/sysctl.h>
#include <sys/param.h>
#include <sys/mount.h>
+#include <sys/reboot.h>
#include <fcntl.h>
#include <notify.h>
@@ -4452,7 +4453,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
if (void (*SBReboot)(mach_port_t) = reinterpret_cast<void (*)(mach_port_t)>(dlsym(RTLD_DEFAULT, "SBReboot")))
SBReboot(SBSSpringBoardServerPort());
else
- system("reboot");
+ reboot2(RB_AUTOBOOT);
break;
}
}
diff --git a/iPhonePrivate.h b/iPhonePrivate.h
index 9778f9d..fd834c4 100644
--- a/iPhonePrivate.h
+++ b/iPhonePrivate.h
@@ -350,6 +350,7 @@ extern float const UIWebViewGrowsAndShrinksToFitHeight;
extern float const UIWebViewScalesToFitScale;
// }}}
// extern "C" *(); {{{
+extern "C" void *reboot2(uint64_t flags);
extern "C" mach_port_t SBSSpringBoardServerPort();
extern "C" UIImage *_UIImageWithName(NSString *name);
extern "C" void UISetColor(CGColorRef color);