mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
b612e07c0b
svn path=/nixpkgs/trunk/; revision=28874
21 lines
576 B
Diff
21 lines
576 B
Diff
Debian patch
|
|
diff -ruN tcp_wrappers_7.6.orig/percent_m.c tcp_wrappers_7.6/percent_m.c
|
|
--- tcp_wrappers_7.6.orig/percent_m.c 1994-12-28 17:42:37.000000000 +0100
|
|
+++ tcp_wrappers_7.6/percent_m.c 2003-08-21 02:45:31.000000000 +0200
|
|
@@ -29,11 +29,15 @@
|
|
|
|
while (*bp = *cp)
|
|
if (*cp == '%' && cp[1] == 'm') {
|
|
+#ifdef HAVE_STRERROR
|
|
+ strcpy(bp, strerror(errno));
|
|
+#else
|
|
if (errno < sys_nerr && errno > 0) {
|
|
strcpy(bp, sys_errlist[errno]);
|
|
} else {
|
|
sprintf(bp, "Unknown error %d", errno);
|
|
}
|
|
+#endif
|
|
bp += strlen(bp);
|
|
cp += 2;
|
|
} else {
|