| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
#include "errno-util.h" |
| 4 |
|
| 5 |
const char* strerror_or_eof(int errnum, char *buf, size_t buflen) { |
| 6 |
if (errnum != 0) |
| 7 |
return strerror_r(ABS(errnum), buf, buflen); |
| 8 |
|
| 9 |
return "Unexpected EOF"; |
| 10 |
} |