mdns: don't use non-standard ushot type
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Feb 2013 11:20:43 +0000 (12:20 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 20 Feb 2013 11:22:59 +0000 (12:22 +0100)
src/mdns.c: In function 'ip_checksum':
src/mdns.c:94:19: error: 'ushort' undeclared (first use in this function)

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/mdns/src/mdns.c

index 2d5e06a..a5d386d 100644 (file)
@@ -91,8 +91,8 @@ static uint16_t ip_checksum(char* data, int len)
     else
         len = (len >> 1) + 1;
     while (len > 0) {
-        sum += *((ushort*)data);
-        data += sizeof(ushort);
+        sum += *((unsigned short int*)data);
+        data += sizeof(unsigned short int);
         len--;
     }
     sum = (sum >> 16) + (sum & 0xffff);