--- a/tools/TexturePacker/XBTFWriter.cpp
+++ b/tools/TexturePacker/XBTFWriter.cpp
@@ -28,6 +28,7 @@
 #include "EndianSwap.h"
 #define __STDC_FORMAT_MACROS
 #include <inttypes.h>
+#include <unistd.h> /* for unlink() prototype */
 
 #define TEMP_FILE "temp.xbt"
 #define TEMP_SIZE (10*1024*1024)