aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/include/net/arpa/inet.h4
-rw-r--r--system/include/sys/ioctl.h2
-rw-r--r--system/include/sys/socket.h1
-rw-r--r--system/lib/dlmalloc.c1
4 files changed, 8 insertions, 0 deletions
diff --git a/system/include/net/arpa/inet.h b/system/include/net/arpa/inet.h
index 06d44183..83eaa0fa 100644
--- a/system/include/net/arpa/inet.h
+++ b/system/include/net/arpa/inet.h
@@ -7,6 +7,7 @@ extern "C" {
#endif
#include <stdint.h>
+#include <netdb.h>
uint32_t htonl(uint32_t hostlong);
uint16_t htons(uint16_t hostshort);
@@ -16,6 +17,9 @@ uint16_t ntohs(uint16_t netshort);
int inet_aton(const char *cp, struct in_addr *addr);
char *inet_ntoa(struct in_addr in);
+int inet_pton(int af, const char *src, void *dst);
+const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
+
typedef long in_addr_t;
in_addr_t inet_addr(const char *cp);
diff --git a/system/include/sys/ioctl.h b/system/include/sys/ioctl.h
index edc9ea36..12857ae3 100644
--- a/system/include/sys/ioctl.h
+++ b/system/include/sys/ioctl.h
@@ -11,6 +11,8 @@ extern "C" {
#define TIOCGSIZE 80 // bogus
#define TIOCGWINSZ 80 // bogus
+#define FIONREAD 1
+
int ioctl(int d, int request, ...);
#define SO_RCVTIMEO 1000
diff --git a/system/include/sys/socket.h b/system/include/sys/socket.h
index 69bbdcaa..2955a56d 100644
--- a/system/include/sys/socket.h
+++ b/system/include/sys/socket.h
@@ -23,6 +23,7 @@ extern "C" {
#define SO_RCVBUF 60
#define SO_LINGER 70
#define SO_NOSIGPIPE 80
+#define SO_KEEPALIVE 90
#define SHUT_RDWR 1
diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c
index 6185b1c7..9ee3709e 100644
--- a/system/lib/dlmalloc.c
+++ b/system/lib/dlmalloc.c
@@ -4141,6 +4141,7 @@ static int sys_trim(mstate m, size_t pad) {
sp->size >= extra &&
!has_segment_link(m, sp)) { /* can't shrink if pinned */
size_t newsize = sp->size - extra;
+ (void)newsize; // XXX EMSCRIPTEN
/* Prefer mremap, fall back to munmap */
if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
(CALL_MUNMAP(sp->base + newsize, extra) == 0)) {