chiark / gitweb /
Add uint16_t if missing.
[disorder] / lib / common.h
index 9cf38921a86a4060a5804faa21e97ac7c895144d..99f867162698946bfa680019fa1da58abfaad639 100644 (file)
@@ -117,6 +117,14 @@ typedef unsigned char uint32_t;
 # endif
 #endif
 
+#if ! HAVE_UINT16_T
+# if USHRT_MAX == 65535
+typedef unsigned short uint16_t;
+# else
+#  error cannot determine uint16_t
+# endif
+#endif
+
 #if !HAVE_CLOSESOCKET
 # define closesocket close
 #endif