Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2023 21:49:23 +0200
From:      Hans Petter Selasky <hselasky@freebsd.org>
To:        Charlie Li <vishwin@freebsd.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   Re: git: 8dcf3a82c54c - main - libc: Implement bsort(3) a bitonic type of sorting algorithm.
Message-ID:  <fd723dfc-b424-f7ae-f116-334868f43044@freebsd.org>
In-Reply-To: <f79a67bc-2bfe-d832-10a9-9e19b9cc9c0d@freebsd.org>
References:  <202304191206.33JC6Qcp062380@gitrepo.freebsd.org> <f79a67bc-2bfe-d832-10a9-9e19b9cc9c0d@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/19/23 21:07, Charlie Li wrote:
> Hans Petter Selasky wrote:

> This causes ports to fail, so far with Python's configure phase and any 
> Python ports with C extensions:
> 
> In file included from /usr/local/include/python3.11/Python.h:23:
> /usr/include/stdlib.h:409:1: error: unknown type name 'errno_t'
> errno_t  bsort_s(void *, rsize_t, rsize_t,
> ^
> /usr/include/stdlib.h:409:35: error: redefinition of parameter 'rsize_t'
> errno_t  bsort_s(void *, rsize_t, rsize_t,
>                                    ^
> /usr/include/stdlib.h:409:26: note: previous declaration is here
> errno_t  bsort_s(void *, rsize_t, rsize_t,
>                           ^
> 2 errors generated.
> 

Hi Charlie,

The following patch should fix it. I'm just kicking a buildworld to 
ensure nothing else is broken. Will push this once that is complete.

> From ed6a0aaa839086cfe2037989fc8feb3ac864be63 Mon Sep 17 00:00:00 2001
> From: Hans Petter Selasky <hselasky@FreeBSD.org>
> Date: Wed, 19 Apr 2023 21:37:29 +0200
> Subject: [PATCH] libc: bsort_s() requires both __BSD_VISIBLE and
>  __EXT1_VISIBLE
> 
> Fixes build of Python.
> 
> Found by:	vishwin@
> MFC after:	1 week
> Sponsored by:	NVIDIA Networking
> Differential Revision:	https://reviews.freebsd.org/D36493
> ---
>  include/stdlib.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/stdlib.h b/include/stdlib.h
> index 857092b9053e..3ad28cf68847 100644
> --- a/include/stdlib.h
> +++ b/include/stdlib.h
> @@ -403,12 +403,12 @@ void ignore_handler_s(const char * __restrict, void * __restrict, errno_t);
>  /* K.3.6.3.2 */
>  errno_t	 qsort_s(void *, rsize_t, rsize_t,
>      int (*)(const void *, const void *, void *), void *);
> -#endif /* __EXT1_VISIBLE */
>  
>  #if __BSD_VISIBLE
>  errno_t	 bsort_s(void *, rsize_t, rsize_t,
>      int (*)(const void *, const void *, void *), void *);
>  #endif /* __BSD_VISIBLE */
> +#endif /* __EXT1_VISIBLE */
>  
>  __END_DECLS
>  __NULLABILITY_PRAGMA_POP
> -- 
> 2.40.0

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fd723dfc-b424-f7ae-f116-334868f43044>