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

Richard Purdie
2023-11-23T12:39:17Z

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.

Cheers,

Richard