syscall_net: build on Z80
authorAlan Cox <alan@linux.intel.com>
Tue, 2 Jun 2015 17:27:48 +0000 (18:27 +0100)
committerAlan Cox <alan@linux.intel.com>
Tue, 2 Jun 2015 17:27:48 +0000 (18:27 +0100)
Kernel/cpu-z80/cpu.h
Kernel/syscall_net.c

index 3769db0..f5bf399 100644 (file)
@@ -73,3 +73,5 @@ typedef union {            /* this structure is endian dependent */
 /* Do not use COMMON_MEMORY except for __asm code blocks. The SDCC helpers are not
    loaded into common */
 #define COMMON_MEMORY   static void COMMONSEG(void)  __naked { __asm .area _COMMONMEM __endasm; }
+
+#define ntohs(x)       ((((x) & 0xFF) << 8) | (((x) & 0xFF00) >> 8))
\ No newline at end of file
index 74c6b77..bbd0fec 100644 (file)
@@ -88,6 +88,8 @@ static int sock_autobind(struct socket *s)
 
 static struct socket *sock_find_local(uint32_t addr, uint16_t port)
 {
+       used(addr);
+       used(port);
        /* TODO */
        return NULL;
 }