|
@@ -31,6 +31,7 @@
|
|
#include <errno.h>
|
|
#include <errno.h>
|
|
#include <stdint.h>
|
|
#include <stdint.h>
|
|
#include <limits.h>
|
|
#include <limits.h>
|
|
|
|
+#include <linux/string.h>
|
|
|
|
|
|
#include <netinet/ip6.h>
|
|
#include <netinet/ip6.h>
|
|
#include "event-parse.h"
|
|
#include "event-parse.h"
|
|
@@ -6131,12 +6132,7 @@ int pevent_strerror(struct pevent *pevent __maybe_unused,
|
|
const char *msg;
|
|
const char *msg;
|
|
|
|
|
|
if (errnum >= 0) {
|
|
if (errnum >= 0) {
|
|
- msg = strerror_r(errnum, buf, buflen);
|
|
|
|
- if (msg != buf) {
|
|
|
|
- size_t len = strlen(msg);
|
|
|
|
- memcpy(buf, msg, min(buflen - 1, len));
|
|
|
|
- *(buf + min(buflen - 1, len)) = '\0';
|
|
|
|
- }
|
|
|
|
|
|
+ str_error_r(errnum, buf, buflen);
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|