Fix build in 5.1 tree

Change-Id: I15f888d58c01de00920dc5c56148d363f4dd79b8
diff --git a/minuitwrp/events.cpp b/minuitwrp/events.cpp
index 9374ef1..a2a3d16 100755
--- a/minuitwrp/events.cpp
+++ b/minuitwrp/events.cpp
@@ -127,12 +127,14 @@
 int vibrate(int timeout_ms)
 {
     if (timeout_ms > 10000) timeout_ms = 1000;
+    char tout[6];
+    sprintf(tout, "%i", timeout_ms);
 
     if (std::ifstream(LEDS_HAPTICS_ACTIVATE_FILE).good()) {
-        write_to_file(LEDS_HAPTICS_DURATION_FILE, std::to_string(timeout_ms));
+        write_to_file(LEDS_HAPTICS_DURATION_FILE, tout);
         write_to_file(LEDS_HAPTICS_ACTIVATE_FILE, "1");
     } else
-        write_to_file(VIBRATOR_TIMEOUT_FILE, std::to_string(timeout_ms));
+        write_to_file(VIBRATOR_TIMEOUT_FILE, tout);
 
     return 0;
 }