diff options
author | Joel Stanley <joel@jms.id.au> | 2016-07-25 15:20:20 +0930 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-28 13:45:16 +1000 |
commit | 72c551ff9d163a65087ca0865e736456f291995a (patch) | |
tree | 0976a57bc5b669f88125f1b7f8596e7600fab777 /external | |
parent | a6c78e5416a1bc69184ee7669de8eb8f43f6dbed (diff) | |
download | skiboot-72c551ff9d163a65087ca0865e736456f291995a.zip skiboot-72c551ff9d163a65087ca0865e736456f291995a.tar.gz skiboot-72c551ff9d163a65087ca0865e736456f291995a.tar.bz2 |
pflash: use atexit for musl compatibility
I accidentally built myself a cross-toolchain with the musl libc. It does
not support on_exit which we use to clean up in pflash.
Instead use atexit with is supported by both uclibc, musl and glibc.
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/pflash/pflash.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/external/pflash/pflash.c b/external/pflash/pflash.c index c124356..2700046 100644 --- a/external/pflash/pflash.c +++ b/external/pflash/pflash.c @@ -509,7 +509,7 @@ static void print_help(const char *pname) printf("\t\tThis message.\n\n"); } -void exiting(int d, void *p) +void exiting(void) { if (need_relock) arch_flash_set_wrprotect(bl, 1); @@ -775,8 +775,7 @@ int main(int argc, char *argv[]) exit(1); } - on_exit(exiting, NULL); - + atexit(exiting); rc = blocklevel_get_info(bl, &fl_name, &fl_total_size, &fl_erase_granule); |