[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Minios-devel] [UNIKRAFT PATCH 3/3] lib/posix-crypt: Adapt imported musl code to Unikraft
Hi Costin,
See inline.
Roxana
On 26.11.2019 00:37, Costin Lupu wrote:
The only thing worth mentioning here is that we tried to keep the changes to a
minimum. That is why we use the C preprocessor in order to disable the 'hidden'
musl qualifier.
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
lib/posix-crypt/Makefile.uk | 19 +++++++++++++++++++
.../musl-imported/src/crypt/crypt_r.c | 2 +-
.../musl-imported/src/include/crypt.h | 2 +-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/lib/posix-crypt/Makefile.uk b/lib/posix-crypt/Makefile.uk
index 3ac8b855..8539195c 100644
--- a/lib/posix-crypt/Makefile.uk
+++ b/lib/posix-crypt/Makefile.uk
@@ -1 +1,20 @@
$(eval $(call addlib_s,libposix_crypt,$(CONFIG_LIBPOSIX_CRYPT)))
+
+LIBPOSIX_CRYPT_GLOBAL_INCLUDES-y += -I$(LIBPOSIX_CRYPT_BASE)/include
+CINCLUDES-$(CONFIG_LIBPOSIX_CRYPT) += $(LIBPOSIX_CRYPT_GLOBAL_INCLUDES-y)
+CXXINCLUDES-$(CONFIG_LIBPOSIX_CRYPT) += $(LIBPOSIX_CRYPT_GLOBAL_INCLUDES-y)
+
+LIBPOSIX_CRYPT_CINCLUDES-y +=
-I$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/include
+
+LIBPOSIX_CRYPT_SUPPRESS_FLAGS-y += -Wno-missing-braces -Wno-sign-compare
+LIBPOSIX_CRYPT_CFLAGS-y += $(LIBPOSIX_CRYPT_SUPPRESS_FLAGS-y)
+LIBPOSIX_CRYPT_CFLAGS-y += -Dhidden=
+
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_blowfish.c
+LIBPOSIX_CRYPT_SRCS-y += $(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_des.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_md5.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_r.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_sha256.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/crypt_sha512.c
+LIBPOSIX_CRYPT_SRCS-y +=
$(LIBPOSIX_CRYPT_BASE)/musl-imported/src/crypt/encrypt.c
diff --git a/lib/posix-crypt/musl-imported/src/crypt/crypt_r.c
b/lib/posix-crypt/musl-imported/src/crypt/crypt_r.c
index db6015e2..fdc3b0c4 100644
--- a/lib/posix-crypt/musl-imported/src/crypt/crypt_r.c
+++ b/lib/posix-crypt/musl-imported/src/crypt/crypt_r.c
@@ -20,4 +20,4 @@ char *__crypt_r(const char *key, const char *salt, struct
crypt_data *data)
return __crypt_des(key, salt, output);
}
There are some warnings like `crypt_r.c:12:11: warning: implicit
declaration of function __crypt_md5`
because the internal `crypt.h` header file is not included in
`crypt_r.c`. Can you solve these, please?
-weak_alias(__crypt_r, crypt_r);
+/* TODO weak_alias(__crypt_r, crypt_r); */
diff --git a/lib/posix-crypt/musl-imported/src/include/crypt.h
b/lib/posix-crypt/musl-imported/src/include/crypt.h
index f6c63095..c3dad717 100644
--- a/lib/posix-crypt/musl-imported/src/include/crypt.h
+++ b/lib/posix-crypt/musl-imported/src/include/crypt.h
@@ -3,7 +3,7 @@
#include "../../include/crypt.h"
-#include <features.h>
+/* TODO #include <features.h> */
hidden char *__crypt_r(const char *, const char *, struct crypt_data *);
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|