Skip to content

Conversation

@LordGrimmauld
Copy link
Contributor

@LordGrimmauld LordGrimmauld commented Jul 10, 2025

sys/types.h is indirectly included with glibc, but needs to be specified explicitly on musl.

The symbol collisions on __attr_dealloc_free require including auparse first for some reason.
Not a symbol collision, rather some #defines don't actually define __attr_dealloc_free causing the #ifndef to skip over __attr_dealloc_free, which is then all kinds of broken.

closes #475

@stevegrubb
Copy link
Contributor

Looking at the change in auplugin.c, the include should go after config.h. See if it still works when moved down so it is past the system includes and before common.h. If so, We can merge the patch.

Also, the difference between auplugin.h and libaudit.h is that auplugin doesn't define __attr_dealloc_free which could be problematic. I also looked to see if there were any other differences defining the function attributes. They are all copy and paste identical except as noted above.

`sys/types.h` is indirectly included with `glibc`,
but needs to be specified explicitly on musl.
Otherwise, header include order matters when building against a libc that
does not itself define __attr_dealloc_free, such as musl.
@LordGrimmauld
Copy link
Contributor Author

I ended up going with the #ifndef route outlined in #475 (comment). There is no CI for musl builds, relying on header include order is unnecessarily fragile in that scenario. Separate #defines are better. And more descriptive of what is going on and why! Good call.

@stevegrubb
Copy link
Contributor

Thanks

@stevegrubb stevegrubb merged commit f0670d7 into linux-audit:master Jul 11, 2025
4 checks passed
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.

build failure: musl

2 participants