Skip to content

Cast the 'addr' argument of 'madvise()' for AIX#2655

Merged
asomers merged 2 commits intonix-rust:masterfrom
xingxue-ibm:fix-madvise
Sep 17, 2025
Merged

Cast the 'addr' argument of 'madvise()' for AIX#2655
asomers merged 2 commits intonix-rust:masterfrom
xingxue-ibm:fix-madvise

Conversation

@xingxue-ibm
Copy link
Copy Markdown
Contributor

@xingxue-ibm xingxue-ibm commented Jul 30, 2025

What does this PR do

The AIX signature of madvise() differs from the POSIX specification, which expects void * as the type of the addr argument, whereas AIX uses caddr_t (i.e., char *). This patch casts addr inside the nix wrapper madvise() to smooth it out.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@amy-kwan
Copy link
Copy Markdown

amy-kwan commented Sep 4, 2025

Ping.

Hi @asomers! Would you be the right person to ping in order to review this PR?

@asomers
Copy link
Copy Markdown
Member

asomers commented Sep 7, 2025

This looks ok. But could you please add a changelog entry?

@xingxue-ibm
Copy link
Copy Markdown
Contributor Author

This looks ok. But could you please add a changelog entry?

Added file 2655.fixed.md. Thanks for the reminder!

@asomers asomers added this pull request to the merge queue Sep 17, 2025
Merged via the queue into nix-rust:master with commit caeaf33 Sep 17, 2025
39 checks passed
@amy-kwan
Copy link
Copy Markdown

Hi @asomers. I'm not sure if this is an appropriate question to ask, but are there any plans for another release of nix in the future? Just wondering as we're working on AIX support for nix as well, and having this change in a future release would be nice.

@asomers
Copy link
Copy Markdown
Member

asomers commented Nov 13, 2025

@amy-kwan there are usually few obstacles to publishing a new release of Nix. There's been a big one lately, which is a complicated CI breakage, but that should fixed within the hour. So yes, we can publish a new release soon.

@amy-kwan
Copy link
Copy Markdown

there are usually few obstacles to publishing a new release of Nix. There's been a big one lately, which is a complicated CI breakage, but that should fixed within the hour. So yes, we can publish a new release soon.

@asomers Makes sense. Thank you for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants