Re: tmdns patches
Steve G <[email protected]> Sun, 1 Feb 2004 06:34:37 -0800 (PST)
| Newsgroups | gmane.network.zeroconf.workers |
|---|---|
| Message-ID | <[email protected]> |
>Ooops, wanted to say "a 32bit unsigned int". I'm still not >sure what a "unsigned long" is on anything that is not a >32bit CPU ... long should be 32 bit. Int is subject to debate though. I looked at the type. POSIX supports uint32_t. There will be compile problems for u_int32_t under Solaris and maybe some BSD's. >There is one that comes with heimdal kerberos but AFIR it has >the advertising clause. Another implementation is in glibc >2.3.2. OK, not sure you want to pull in a glibc file. They have many strange defines. It looks like the source was from an OpenBSD compatibility library. They are usually real portable without much problems. What is in tmdns is adequate so far. I will try it again when I look into IPv6. The problem I described about the ifaddr.h file is this. Gcc gets confused. I get the following messages: info.c:343: warning: implicit declaration of function `getifaddrs' info.c:348: dereferencing pointer to incomplete type info.c:349: dereferencing pointer to incomplete type The fix for this is to rename ifaddr.h in the server directory to something else like tm_ifaddr.h. It then pulls in the ifaddr.h if HAVE_GETIFADDRS is defined. Otherwise it defines the structures. The attached patch provides this. I will start resyncing to the latest from cvs. -Steve Grubb __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/
tmdns-patch6a.txt
(text/plain, 2.5 KB)
diff -urBb tmdns-devel-e/server/getifaddrs.c tmdns-devel/server/getifaddrs.c --- tmdns-devel-e/server/getifaddrs.c 2004-01-29 12:47:53.000000000 -0500 +++ tmdns-devel/server/getifaddrs.c 2004-01-31 10:23:24.000000000 -0500 @@ -69,7 +69,7 @@ #endif #include <errno.h> -#include "ifaddrs.h" +#include "tm_ifaddrs.h" #include <stdlib.h> #include <string.h> #include <unistd.h> diff -urBb tmdns-devel-e/server/info.c tmdns-devel/server/info.c --- tmdns-devel-e/server/info.c 2004-01-29 11:27:57.000000000 -0500 +++ tmdns-devel/server/info.c 2004-01-31 13:14:03.000000000 -0500 @@ -15,7 +15,7 @@ #include "dns.h" #include "llist.h" #include "info.h" -#include "ifaddrs.h" +#include "tm_ifaddrs.h" static list_t * records; diff -urBb tmdns-devel-e/server/Makefile tmdns-devel/server/Makefile --- tmdns-devel-e/server/Makefile 2004-01-29 09:03:39.000000000 -0500 +++ tmdns-devel/server/Makefile 2004-01-31 10:27:23.000000000 -0500 @@ -120,7 +120,7 @@ debug.c debug.h\ llist.c llist.h\ dns.c dns.h \ - getifaddrs.c ifaddrs.h \ + getifaddrs.c tm_ifaddrs.h \ info.c info.h\ tmdns.c tmdns.h \ serv_udp.c serv_udp.h diff -urBb tmdns-devel-e/server/Makefile.am tmdns-devel/server/Makefile.am --- tmdns-devel-e/server/Makefile.am 2003-01-11 07:32:37.000000000 -0500 +++ tmdns-devel/server/Makefile.am 2004-01-31 10:26:53.000000000 -0500 @@ -5,7 +5,7 @@ debug.c debug.h\ llist.c llist.h\ dns.c dns.h \ - getifaddrs.c ifaddrs.h \ + getifaddrs.c tm_ifaddrs.h \ info.c info.h\ tmdns.c tmdns.h \ serv_udp.c serv_udp.h diff -urBb tmdns-devel-e/server/Makefile.in tmdns-devel/server/Makefile.in --- tmdns-devel-e/server/Makefile.in 2004-01-29 08:30:49.000000000 -0500 +++ tmdns-devel/server/Makefile.in 2004-01-31 10:27:12.000000000 -0500 @@ -120,7 +120,7 @@ debug.c debug.h\ llist.c llist.h\ dns.c dns.h \ - getifaddrs.c ifaddrs.h \ + getifaddrs.c tm_ifaddrs.h \ info.c info.h\ tmdns.c tmdns.h \ serv_udp.c serv_udp.h diff -urBb tmdns-devel-e/server/serv_udp.c tmdns-devel/server/serv_udp.c --- tmdns-devel-e/server/serv_udp.c 2004-01-29 13:24:43.000000000 -0500 +++ tmdns-devel/server/serv_udp.c 2004-01-31 10:43:22.000000000 -0500 @@ -26,7 +26,7 @@ #include "tmdns.h" #include "serv_udp.h" #include "debug.h" -#include "ifaddrs.h" +#include "tm_ifaddrs.h" #include "conf.h" #define MCAST_V4_ADDR "224.0.0.251"