--- a/src/main.c
+++ b/src/main.c
@@ -25,6 +25,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */

+#include "portable.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -34,7 +36,6 @@
 #include <fcntl.h>
 #include <limits.h>

-#include "portable.h"
 #include "dfu.h"
 #include "dfu_file.h"
 #include "dfu_load.h"
