[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



On 11/26/19 6:56 PM, Roxana Nicolescu wrote:
> 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?

Will do for v2. Thanks for reviewing!

Cheers,
Costin

_______________________________________________
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®.