sys_errlist patch
Steve G <[email protected]> Thu, 29 Jan 2004 05:55:39 -0800 (PST)
| Newsgroups | gmane.network.zeroconf.workers |
|---|---|
| Message-ID | <[email protected]> |
Hello, This is the next patch. It allows tmdns to compile on platform that consider sys_errlist depricated, like Red Hat 9. Without the patch, the linker fails. The patch modifies configure.in, so serveral files will need to be regenerated, like configure and config.h.in. BTW, any decision on the first patch? Best Regards, Steve Grubb __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
tmdns-patch2.txt
(text/plain, 1.5 KB)
diff -urbB tmdns-devel-a/configure.in tmdns-devel/configure.in
--- tmdns-devel-a/configure.in 2004-01-27 20:07:45.000000000 -0500
+++ tmdns-devel/configure.in 2004-01-29 08:29:13.000000000 -0500
@@ -129,7 +129,7 @@
dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_FUNC_WAIT3
-AC_CHECK_FUNCS(select socket strdup strerror inet_ntop inet_pton getifaddrs freeifaddrs)
+AC_CHECK_FUNCS(select socket strdup strerror inet_ntop inet_pton getifaddrs freeifaddrs,strerror)
CHECK_DIST
diff -urbB tmdns-devel-a/server/config.h.in tmdns-devel/server/config.h.in
--- tmdns-devel-a/server/config.h.in 2004-01-27 20:07:46.000000000 -0500
+++ tmdns-devel/server/config.h.in 2004-01-29 08:30:05.000000000 -0500
@@ -27,6 +27,9 @@
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
/* Define to 1 if you have the <ifaddr.h> header file. */
#undef HAVE_IFADDR_H
diff -urbB tmdns-devel-a/server/debug.c tmdns-devel/server/debug.c
--- tmdns-devel-a/server/debug.c 2004-01-27 20:28:01.000000000 -0500
+++ tmdns-devel/server/debug.c 2004-01-29 08:28:16.000000000 -0500
@@ -99,7 +99,11 @@
* return the error message for the error number
****************************************************************************/
const char * debug_errmsg( int _errno ) {
+#ifdef HAVE_STRERROR
+ return strerror(_errno);
+#else
if( (_errno < sys_nerr) && (_errno >= 0) )
return sys_errlist[_errno];
return "unknown error";
+#endif
}