Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/cdefs.h missing on musl #197

Closed
oxr463 opened this issue Jan 16, 2022 · 2 comments · Fixed by #206
Closed

sys/cdefs.h missing on musl #197

oxr463 opened this issue Jan 16, 2022 · 2 comments · Fixed by #206

Comments

@oxr463
Copy link

oxr463 commented Jan 16, 2022

In 62afa2a #include <sys/cdefs.h> was added to src/compiler.h. This header is not included in musl libc.

@oxr463
Copy link
Author

oxr463 commented Jan 16, 2022

I took that line out:

sed -i src/compiler.h

This is the only error I see:

efisecdb.c: In function 'main':
efisecdb.c:379:2: warning: implicit declaration of function 'on_exit'; did you mean '_exit'? [-Wimplicit-function-declaration]
  379 |  on_exit(free_actions, &actions);
      |  ^~~~~~~
      |  _exit

@floppym
Copy link
Contributor

floppym commented Jan 17, 2022

The on_exit function appears to be glibc-specific.
https://www.gnu.org/software/libc/manual/html_node/Cleanups-on-Exit.html

ncopa added a commit to ncopa/efivar that referenced this issue Jan 28, 2022
Use POSIX atexit(3) instead of the GNU specific on_exit(3).

on_exit(3) does not provide any real value since the arguments passed
needs to be globals anyway.

Set oufile=NULL on success to prevent deletion from the atexit handler,
which does not take a exit status argument.

Resolves: rhboot#197
Resolves: rhboot#202
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
@ncopa ncopa mentioned this issue Jan 28, 2022
ncopa added a commit to ncopa/efivar that referenced this issue Jan 28, 2022
Refactor code to use POSIX atexit(3) instead of the GNU specific
on_exit(3).

Resolves: rhboot#197
Resolves: rhboot#202
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
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 a pull request may close this issue.

2 participants