mirror of
https://github.com/curl/curl.git
synced 2026-06-19 19:15:37 +03:00
AmigaOS: curl_setup.h avoid explicit_bzero with clib2
clib2 defines __NEWLIB__ after its system headers are included, but it
does not provide explicit_bzero().
curl therefore selects the explicit_bzero() path and fails to build with
m68k-amigaos-gcc:
```
../lib/curl_setup.h:1650:35: error: implicit declaration of function 'explicit_bzero' [-Werror=implicit-function-declaration]
1650 | #define curlx_memzero(buf, size) explicit_bzero(buf, size)
| ^~~~~~~~~~~~~~
curlx/strdup.c:115:5: note: in expansion of macro 'curlx_memzero'
115 | curlx_memzero(buf, size);
| ^~~~~~~~~~~~~
```
Excluding __CLIB2__ from the generic __NEWLIB__ branch makes curl use
its existing portable curlx_memzero() fallback. The full AmigaOS build
then completes successfully.
I've tested the following on Amiga OS 3.2.3 with this patch and latest
build.
- HTTP and HTTPS transfers
- AmiSSL certificate handling
- redirects
- downloads and file output
- timeout handling with the expected exit code 28
- repeated execution with clean exits
- no crashes or regressions observed
Follow-up to 066478f634 #21598
Closes #21989
This commit is contained in:
parent
fb2441294e
commit
982e2e8c75
1 changed files with 2 additions and 1 deletions
|
|
@ -1641,7 +1641,8 @@ typedef struct sockaddr_un {
|
|||
#define curlx_memzero(buf, size) (void)memset_s(buf, size, 0, size)
|
||||
#elif defined(HAVE_MEMSET_EXPLICIT)
|
||||
#define curlx_memzero(buf, size) (void)memset_explicit(buf, 0, size)
|
||||
#elif defined(__CYGWIN__) || defined(__NEWLIB__) || \
|
||||
#elif defined(__CYGWIN__) || \
|
||||
(defined(__NEWLIB__) && !defined(__CLIB2__)) || \
|
||||
(defined(__GLIBC__) && \
|
||||
(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 25))) || \
|
||||
(defined(__DragonFly__) && __DragonFly_version >= 500600 /* v5.6+ */) || \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue