Re: [OE-core][kirkstone 16/16] libxcrypt: fixed some build error for nativesdk with mingw

Steve Sakoman
2023-11-23T14:37:58Z

On Thu, Nov 23, 2023 at 2:39 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2023-11-21 at 16:31 -1000, Steve Sakoman wrote:
> > From: Wenlin Kang <wenlin.kang@windriver.com>
> >
> > Steps to reproduce
> > 1) add layer meta-mingw
> > 2) add line in local.conf
> > SDKMACHINE = "x86_64-mingw32"
> > 3) bitbake nativesdk-libxcrypt
> >
> > Fixed:
> > 1. .symver error
> > | {standard input}: Assembler messages:
> > | {standard input}:4: Error: unknown pseudo-op: `.symver'
> >
> > 2. pedantic error
> > | ../git/lib/crypt.c:316:24: error: ISO C does not allow extra ';' outside of a function [-Werror=pedantic]
> > | 316 | SYMVER_crypt_gensalt_rn;
> > | |
> >
> > 3. conversion error
> > | ../git/lib/util-get-random-bytes.c: In function '_crypt_get_random_bytes':
> > | ../git/lib/util-get-random-bytes.c:140:42: error: conversion from 'size_t' {aka 'long long unsigned int'} to 'unsigned int' may change value [-Werror=conversion]
> > | 140 | ssize_t nread = read (fd, buf, buflen);
> >
> > Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
> > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > ---
> > .../0001-Fix-for-compilation-on-Windows.patch | 37 +++++++++++++++
> > ...dom-bytes.c-fixed-conversion-error-w.patch | 47 +++++++++++++++++++
> > meta/recipes-core/libxcrypt/libxcrypt.inc | 4 ++
> > 3 files changed, 88 insertions(+)
> > create mode 100644 meta/recipes-core/libxcrypt/files/0001-Fix-for-compilation-on-Windows.patch
> > create mode 100644 meta/recipes-core/libxcrypt/files/0001-lib-util-get-random-bytes.c-fixed-conversion-error-w.patch
>
> This isn't in master, not is it going to be.

OK, I will drop this patch for kirkstone. Thanks for the review.

Steve