2003-09-03 09:28:50 +02:00
|
|
|
--- strace-4.4/syscall.c.orig 2003-09-03 01:15:32.000000000 -0600
|
|
|
|
+++ strace-4.4/syscall.c 2003-09-03 01:20:35.000000000 -0600
|
|
|
|
@@ -71,10 +71,12 @@
|
|
|
|
# include <asm/rse.h>
|
2003-06-27 03:51:07 +02:00
|
|
|
#endif
|
|
|
|
|
2003-09-03 09:28:50 +02:00
|
|
|
+#ifndef HAVE_STRERROR
|
|
|
|
#ifndef SYS_ERRLIST_DECLARED
|
|
|
|
extern int sys_nerr;
|
|
|
|
extern char *sys_errlist[];
|
|
|
|
#endif /* SYS_ERRLIST_DECLARED */
|
|
|
|
+#endif /* HAVE_STERRROR */
|
2003-06-27 03:51:07 +02:00
|
|
|
|
2003-09-03 09:28:50 +02:00
|
|
|
#define NR_SYSCALL_BASE 0
|
2003-06-27 03:51:07 +02:00
|
|
|
#ifdef LINUX
|
2003-09-03 09:28:50 +02:00
|
|
|
@@ -1529,6 +1531,7 @@
|
|
|
|
#endif /* LINUX */
|
|
|
|
default:
|
|
|
|
tprintf("= -1 ");
|
|
|
|
+#ifndef HAVE_STRERROR
|
|
|
|
if (u_error < nerrnos && u_error < sys_nerr)
|
|
|
|
tprintf("%s (%s)", errnoent[u_error],
|
|
|
|
sys_errlist[u_error]);
|
|
|
|
@@ -1540,6 +1543,13 @@
|
|
|
|
sys_errlist[u_error]);
|
|
|
|
else
|
|
|
|
tprintf("E??? (errno %ld)", u_error);
|
|
|
|
+#else
|
|
|
|
+ if (u_error < nerrnos)
|
|
|
|
+ tprintf("%s (%s)", errnoent[u_error],
|
|
|
|
+ strerror(u_error));
|
|
|
|
+ else
|
|
|
|
+ tprintf("E??? (errno %ld)", u_error);
|
|
|
|
+#endif
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|