[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH] Add missing definitions needed for Redis port


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Fri, 1 Nov 2019 13:30:56 +0200
  • Cc: felipe.huici@xxxxxxxxx
  • Delivery-date: Fri, 01 Nov 2019 11:31:05 +0000
  • Ironport-sdr: yjYNFySfj1H4rCDQRHCNAswTgCTBQ7EYzNdPi+H/oS+HjIrmdhtM7ZcDH6NeQIYOfYmXUs0+0l OJM8hV78jRrw==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

- Add ESOCKTNOSUPPORT error number
- Copy SA_NODEFER and SA_RESETHAND from musl
- Enable llroundl() function from origin code

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 Makefile.uk          | 4 ++++
 include/sys/errno.h  | 8 ++++++++
 include/sys/signal.h | 3 +++
 3 files changed, 15 insertions(+)
 create mode 100644 include/sys/errno.h

diff --git a/Makefile.uk b/Makefile.uk
index e5cebdd..a820aea 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -84,6 +84,9 @@ LIBNEWLIB_GLOBAL_FLAGS-y  += -DMISSING_SYSCALL_NAMES 
-DMALLOC_PROVIDED
 LIBNEWLIB_GLOBAL_FLAGS-y  += -D_POSIX_REALTIME_SIGNALS
 LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_WANT_IO_C99_FORMATS) += 
-D_WANT_IO_C99_FORMATS
 LIBNEWLIB_GLOBAL_FLAGS-$(CONFIG_LIBNEWLIBC_LINUX_ERRNO_EXTENSIONS) += 
-D__LINUX_ERRNO_EXTENSIONS__
+ifeq ($(CONFIG_ARCH_X86_64),y)
+LIBNEWLIB_GLOBAL_FLAGS-y  += -D_LDBL_EQ_DBL
+endif
 
 CFLAGS-y   += $(LIBNEWLIB_GLOBAL_FLAGS-y)
 CXXFLAGS-y += $(LIBNEWLIB_GLOBAL_FLAGS-y)
@@ -969,6 +972,7 @@ LIBNEWLIBM_SRCS-y += $(LIBNEWLIB_LIBM)/math/w_tgamma.c
 
################################################################################
 # Newlib/libm code -- common
 
################################################################################
+LIBNEWLIBM_SRCS-y += $(LIBNEWLIB_LIBM)/common/llroundl.c
 LIBNEWLIBM_SRCS-y += $(LIBNEWLIB_LIBM)/common/s_finite.c
 LIBNEWLIBM_SRCS-y += $(LIBNEWLIB_LIBM)/common/s_copysign.c
 LIBNEWLIBM_SRCS-y += $(LIBNEWLIB_LIBM)/common/s_modf.c
diff --git a/include/sys/errno.h b/include/sys/errno.h
new file mode 100644
index 0000000..11952ea
--- /dev/null
+++ b/include/sys/errno.h
@@ -0,0 +1,8 @@
+#ifndef __NEWLIB_GLUE__SYS_TYPES_H__
+#define __NEWLIB_GLUE__SYS_TYPES_H__
+
+#include_next <sys/errno.h>
+
+#define ESOCKTNOSUPPORT 94
+
+#endif /* __NEWLIB_GLUE__SYS_TYPES_H__ */
diff --git a/include/sys/signal.h b/include/sys/signal.h
index 686eae3..706302b 100644
--- a/include/sys/signal.h
+++ b/include/sys/signal.h
@@ -34,4 +34,7 @@
 
 #define si_pid si_code /* hack until we have signals in Unikraft */
 
+#define SA_NODEFER    0x40000000
+#define SA_RESETHAND  0x80000000
+
 #include_next <sys/signal.h>
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.