Switch from strerror_r() to strerror() in update.c for portability
This commit is contained in:
parent
e681035cc4
commit
a8bbedcde3
|
@ -368,11 +368,9 @@ int update_is_readable(const char *fn) {
|
||||||
static void ioerror(const char *iotype, UPDATE *upd) {
|
static void ioerror(const char *iotype, UPDATE *upd) {
|
||||||
avrdude_message(MSG_INFO, "%s: file %s is not %s",
|
avrdude_message(MSG_INFO, "%s: file %s is not %s",
|
||||||
progname, update_outname(upd->filename), iotype);
|
progname, update_outname(upd->filename), iotype);
|
||||||
if(errno) {
|
if(errno)
|
||||||
char buf[1024];
|
avrdude_message(MSG_INFO, ". %s", strerror(errno));
|
||||||
strerror_r(errno, buf, sizeof buf);
|
else if(upd->filename && *upd->filename)
|
||||||
avrdude_message(MSG_INFO, ". %s", buf);
|
|
||||||
} else if(upd->filename && *upd->filename)
|
|
||||||
avrdude_message(MSG_INFO, " (not a regular or character file?)");
|
avrdude_message(MSG_INFO, " (not a regular or character file?)");
|
||||||
avrdude_message(MSG_INFO, "\n");
|
avrdude_message(MSG_INFO, "\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue