From: Alan Cox Date: Tue, 2 Jun 2015 17:27:48 +0000 (+0100) Subject: syscall_net: build on Z80 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=8290fc4d8fb97fd776ccd1a193e5eb630ea6dfe8;p=FUZIX.git syscall_net: build on Z80 --- diff --git a/Kernel/cpu-z80/cpu.h b/Kernel/cpu-z80/cpu.h index 3769db0c..f5bf3997 100644 --- a/Kernel/cpu-z80/cpu.h +++ b/Kernel/cpu-z80/cpu.h @@ -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 diff --git a/Kernel/syscall_net.c b/Kernel/syscall_net.c index 74c6b77b..bbd0fecf 100644 --- a/Kernel/syscall_net.c +++ b/Kernel/syscall_net.c @@ -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; }