diff --git a/mongoose.h b/mongoose.h
index 1b89eb295635ee7e1c92255670c819b85643b610..745b08f6e60a3bc54ec569a744fba47bebb4bb64 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -141,7 +141,7 @@
 #endif
 #define random() rand()
 typedef int socklen_t;
-typedef char int8_t;
+typedef signed char int8_t;
 typedef unsigned char uint8_t;
 typedef int int32_t;
 typedef unsigned int uint32_t;