You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
461 B

  1. --- traceevent/event-parse.c.orig
  2. +++ ./traceevent/event-parse.c
  3. @@ -5121,12 +5121,17 @@
  4. const char *msg;
  5. if (errnum >= 0) {
  6. +#if defined(__GLIBC__)
  7. msg = strerror_r(errnum, buf, buflen);
  8. if (msg != buf) {
  9. size_t len = strlen(msg);
  10. memcpy(buf, msg, min(buflen - 1, len));
  11. *(buf + min(buflen - 1, len)) = '\0';
  12. }
  13. +#else
  14. + if (strerror_r(errnum, buf, buflen))
  15. + snprintf(buf, buflen, "errnum %i", errnum);
  16. +#endif
  17. return 0;
  18. }