aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/shalt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/shalt.c b/bin/shalt.c
index 1fa5428..9dc0028 100644
--- a/bin/shalt.c
+++ b/bin/shalt.c
@@ -2,7 +2,7 @@
#include <sys/reboot.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
+#include <unistd.h>
static char *argv0;
#include "arg.h"
@@ -17,6 +17,8 @@ usage(void)
int
main(int argc, char *argv[])
{
+ sync();
+
ARGBEGIN {
case 'p':
reboot(RB_POWER_OFF);