From 9be904c171e466ab290a237d0a887c4b43f1b57a Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Thu, 28 Sep 2017 16:41:40 +0300 Subject: [PATCH] [platform lib][osx][posix] missed declarations --- klib/src/platform/osx/posix.def | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/klib/src/platform/osx/posix.def b/klib/src/platform/osx/posix.def index 55751cf4b06..b9ecb4139d6 100644 --- a/klib/src/platform/osx/posix.def +++ b/klib/src/platform/osx/posix.def @@ -13,7 +13,7 @@ headers = alloca.h ar.h assert.h complex.h dirent.h dlfcn.h err.h errno.h fcntl. sys/syslimits.h sys/time.h sys/times.h sys/wait.h compilerOpts = -D_XOPEN_SOURCE -linkerOpts = -ldl +linkerOpts = -ldl -lresolv --- // cinterop -def klib/src/platform/osx/posix.def -o platform.posix.klib @@ -27,3 +27,19 @@ static int posix_errno() { static int posix_h_errno() { return h_errno; } + +static short posix_htons(short x) { + return htons(x); +} + +static void posix_FD_ZERO(fd_set *set) { + FD_ZERO(set); +} + +static void posix_FD_SET(int bit, fd_set *set) { + FD_SET(bit, set); +} + +static int posix_FD_ISSET(int bit, fd_set *set) { + return FD_ISSET(bit, set); +}