Skip to content

Commit

Permalink
src/ledctl/ledctl.c: replace on_exit by atexit
Browse files Browse the repository at this point in the history
Replace on_exit by atexit to avoid the following musl build failure
raised since
bcb9042
which partially reverted
f08dd2c:

/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/arm-buildroot-linux-musleabi/12.3.0/../../../../arm-buildroot-linux-musleabi/bin/ld: ledctl-ledctl.o: in function `main':
ledctl.c:(.text.startup+0x140): undefined reference to `on_exit'

Fixes:
 - http://autobuild.buildroot.org/results/d535e03f6ee0f43ecea34fb29ea148a4cdc01169

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed May 9, 2024
1 parent 191338c commit 5c0fa9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ledctl/ledctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ int main(int argc, char *argv[])
if (status != LED_STATUS_SUCCESS)
return status;

if (on_exit(_ledctl_fini, progname))
if (atexit(_ledctl_fini))
exit(LED_STATUS_ONEXIT_ERROR);

status = _read_shared_conf();
Expand Down

0 comments on commit 5c0fa9b

Please sign in to comment.