diff -ur ragel-6.8/ragel/common.h ragel-6.8-haiku/ragel/common.h
--- ragel-6.8/ragel/common.h	2013-02-11 01:57:45.020971520 +0000
+++ ragel-6.8-haiku/ragel/common.h	2013-12-30 19:13:12.330301440 +0000
@@ -24,6 +24,7 @@
 
 #include <fstream>
 #include <climits>
+#include <cstdio>
 #include "dlist.h"
 
 /* Location in an input file. */
diff -ur ragel-6.8/ragel/mlcodegen.cpp ragel-6.8-haiku/ragel/mlcodegen.cpp
--- ragel-6.8/ragel/mlcodegen.cpp	2013-02-11 01:57:45.022282240 +0000
+++ ragel-6.8-haiku/ragel/mlcodegen.cpp	2013-12-30 19:18:36.937426944 +0000
@@ -514,7 +514,7 @@
   {
     data_prefix = string(fsmName) + "_";
     if (data_prefix.size() > 0)
-      data_prefix[0] = ::tolower(data_prefix[0]); // uncapitalize
+      data_prefix[0] = tolower(data_prefix[0]); // uncapitalize
   }
 	if ( !noPrefix )
 		return data_prefix;
