AmigaOS: fix build fallouts, re-add to CI#21993
Closed
vszakats wants to merge 19 commits into
Closed
Conversation
```
src/tool_operate.c:581:50: error: conversion to 'off_t {aka long int}' from 'curl_off_t {aka long long int}' may alter its value [-Werror=conversion]
if(toolx_ftruncate(fileno(outs->stream), outs->init)) {
^~~~
```
https://github.com/curl/curl/actions/runs/27428204937/job/81071486140
This comment was marked as resolved.
This comment was marked as resolved.
```
home/runner/work/curl/curl/tests/libtest/cli_ftp_upload.c:74:28: error: missing braces around initializer [-Werror=missing-braces]
struct timeval timeout = { 1, 0 };
^
```
https://github.com/curl/curl/actions/runs/27428676624/job/81073057087
```
home/runner/work/curl/curl/tests/libtest/lib1960.c:66:44: error: cast discards 'const' qualifier from pointer target type [-Werror=cast-qual]
#define my_inet_pton(x, y, z) inet_pton(x, (unsigned char *)y, z)
^
/home/runner/work/curl/curl/tests/libtest/lib1960.c:107:6: note: in expansion of macro 'my_inet_pton'
if(my_inet_pton(AF_INET, libtest_arg2, &serv_addr.sin_addr) <= 0) {
^~~~~~~~~~~~
```
https://github.com/curl/curl/actions/runs/27428676624/job/81073057087
``` [8/21] Linking C executable tests/server/servers FAILED: [code=1] tests/server/servers : && /opt/amiga/bin/m68k-amigaos-gcc -O0 -msoft-float -mcrt=clib2 tests/server/CMakeFiles/servers.dir/servers.c.obj -o tests/server/servers -lnet -lm -latomic && : /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj: in function `sockdaemon': tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1b8e): undefined reference to `SocketBase' /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1bfc): undefined reference to `SocketBase' /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1c3a): undefined reference to `SocketBase' /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1c9e): undefined reference to `SocketBase' /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj: in function `curlx_nonblock': tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x233c): undefined reference to `SocketBase' /home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x326e): more undefined references to `SocketBase' follow collect2: error: ld returned 1 exit status ``` https://github.com/curl/curl/actions/runs/27429927065/job/81077366910
There was a problem hiding this comment.
Pull request overview
This PR restores and hardens the AmigaOS (m68k) build by fixing several portability/build fallouts across the tool, tests, and CI, and by re-adding an AmigaOS job to the non-native GitHub Actions workflow.
Changes:
- Make AmigaOS-specific portability fixes in the tool and test code (e.g.,
ftruncate()usage,struct timevalinit,inet_pton()const-cast). - Stub out
tests/server/dnsdon AmigaOS so it no longer hard-errors at build time. - Reintroduce an AmigaOS CI job with toolchain/AmiSSL downloads, caching, and hash verification; adjust CMake Amiga linking for AmiSSL.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/server/dnsd.c |
Replace Amiga build-time error with an Amiga stub implementation. |
tests/libtest/lib1960.c |
Use CURL_UNCONST() in Amiga inet_pton() wrapper to avoid const warnings. |
tests/libtest/cli_ftp_upload.c |
Make struct timeval initialization portable by assigning fields. |
src/tool_setup.h |
Add an Amiga-specific toolx_ftruncate() macro to match expected off_t signature. |
CMakeLists.txt |
Ensure AmiSSL libs are included in link libs for Amiga builds. |
.github/workflows/non-native.yml |
Re-add AmigaOS CI job with caching, downloads, and integrity checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix build issues:
toolx_ftruncate().struct timevalinitialization portable.inet_pton()macro.SocketBase.Also:
It takes 30 seconds per job, 1 minute in total.
Thanks-to: Bebbo
Thanks-to: Darren Banfi
Ref: #21989 (comment)
Follow-up to 7a14898 #17486