old_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} $gcc_werror"
-AC_CHECK_TYPES([long long,uint32_t,uint8_t,intmax_t,uintmax_t])
+AC_CHECK_TYPES([long long,uint32_t,uint16_t,uint8_t,intmax_t,uintmax_t])
# Some GCC invocations warn for converting function pointers to void *.
# This is fair enough, as it's technically forbidden, but we use dlsym()
# 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