IOT_GRZYBKI / cantcoap

Dependents:   WIFI_BOARD

Revision:
3:43bbf986ce1e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inet.h	Thu Jan 24 22:38:10 2019 +0000
@@ -0,0 +1,20 @@
+
+uint16_t htons (uint16_t x) {
+#if BYTE_ORDER == BIG_ENDIAN
+  return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  return __bswap_16 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
+
+uint16_t ntohs (uint16_t x) {
+#if BYTE_ORDER == BIG_ENDIAN
+  return x;
+#elif BYTE_ORDER == LITTLE_ENDIAN
+  return __bswap_16 (x);
+#else
+# error "What kind of system is this?"
+#endif
+}
\ No newline at end of file