intel / ledmon

Enclosure LED Utilities
GNU General Public License v2.0
72 stars 49 forks source link

src/ledctl/ledctl.c: replace on_exit by atexit #228

Closed ffontaine closed 6 months ago

ffontaine commented 6 months ago

Replace on_exit by atexit to avoid the following musl build failure raised since https://github.com/intel/ledmon/commit/bcb90426a156fcb3147b5722ed78ac8cf26f2976 which partially reverted https://github.com/intel/ledmon/commit/f08dd2c7b978233f5074aa7991fa894270934391:

/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:

mtkaczyk commented 6 months ago

Hey @ffontaine, beside the checkpatch issue you have to fix, that is interesting that I recently merged your patch in mdadm: https://lore.kernel.org/linux-raid/20240508122939.000067c2@linux.intel.com/T/#t

I'm not well familiar with buildroot, I just read it is a tool for creating embedded linux images and here is a question: Are you integrating VROC with buildroot? If yes, may I ask why? I'm not against it, I'm just curious.

Thanks!

ffontaine commented 6 months ago

Hi,

I updated PR as requested. Concerning VROC, nope I'm not integrating it to buildroot. I'm just fixing build failures raised by buildroot autobuilders.

mtkaczyk commented 6 months ago

@tasleson, that was reverted by your patch, is it accident or you had the reason to change this?

tasleson commented 6 months ago

@tasleson, that was reverted by your patch, is it accident or you had the reason to change this?

I must have ran into something which caused me to change it, but I don't remember why right now. If we run into whatever that is again, we'll deal with it then.