X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=klibc%2Fklibc%2Fperror.c;h=26f8ce8f6d963be5f6740bb6e775d3be87ad9b29;hb=670e470543e02937979e1c879d97f474d5b6fbd1;hp=45585cd57739eed2f97cc8796526429d24ee18ef;hpb=a41a0e28c2ba0abf99b5e7ea17645ae0e4f05758;p=elogind.git diff --git a/klibc/klibc/perror.c b/klibc/klibc/perror.c index 45585cd57..26f8ce8f6 100644 --- a/klibc/klibc/perror.c +++ b/klibc/klibc/perror.c @@ -8,5 +8,6 @@ void perror(const char *s) { - fprintf(stderr, "%s: error %d\n", s, errno); + int e = errno; + fprintf(stderr, "%s: %s\n", s, strerror(e)); }