GNOME Bugzilla – Bug 162289
gnome-vfs-2.8.3: compile error if NS_MAXDNAME and NS_HFIXEDSZ aren't available
Last modified: 2005-01-10 17:57:46 UTC
I got the follwing compile error on NetBSD/sparc-1.5: <-- snip --> ... gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -D_REENTRANT -DORBIT2=1 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/gconf/2 -I/usr/local/include/orbit-2.0 -I/usr/local/include/bonobo-activation-2.0 -I/usr/local/include/libbonobo-2.0 -I/usr/local/include/libxml2 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DORBIT2=1 -I/usr/local/include/libbonobo-2.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/orbit-2.0 -I/usr/local/include/bonobo-activation-2.0 -DXDG_PREFIX=_gnome_vfs_xdg -D_FILE_OFFSET_BITS=64 -D_BSD_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DG_DISABLE_DEPRECATED -DDATADIR=\"/usr/local/share\" -DLIBDIR=\"/usr/local/lib\" -DPREFIX=\"/usr/local\" -DGNOMEVFS_LOCALEDIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -DG_LOG_DOMAIN=\"libgnomevfs\" -O2 -mcpu=v8 -c gnome-vfs-dns-sd.c -Wp,-MD,.deps/gnome-vfs-dns-sd.TPlo -fPIC -DPIC -o .libs/gnome-vfs-dns-sd.o gnome-vfs-dns-sd.c:63: `NS_MAXDNAME' undeclared here (not in a function) gnome-vfs-dns-sd.c: In function `parse_header': gnome-vfs-dns-sd.c:228: `NS_HFIXEDSZ' undeclared (first use in this function) gnome-vfs-dns-sd.c:228: (Each undeclared identifier is reported only once gnome-vfs-dns-sd.c:228: for each function it appears in.) gnome-vfs-dns-sd.c: In function `unicast_list_domains_sync': gnome-vfs-dns-sd.c:311: `NS_MAXDNAME' undeclared (first use in this function) gnome-vfs-dns-sd.c:327: `ns_c_in' undeclared (first use in this function) gnome-vfs-dns-sd.c:327: `ns_t_ptr' undeclared (first use in this function) gnome-vfs-dns-sd.c: In function `unicast_browse_sync': gnome-vfs-dns-sd.c:422: `NS_MAXDNAME' undeclared (first use in this function) gnome-vfs-dns-sd.c:439: `ns_c_in' undeclared (first use in this function) gnome-vfs-dns-sd.c:439: `ns_t_ptr' undeclared (first use in this function) gnome-vfs-dns-sd.c: In function `unicast_resolve_sync': gnome-vfs-dns-sd.c:583: `NS_MAXDNAME' undeclared (first use in this function) gnome-vfs-dns-sd.c:603: `ns_c_in' undeclared (first use in this function) gnome-vfs-dns-sd.c:603: `ns_t_any' undeclared (first use in this function) gnome-vfs-dns-sd.c:647: `ns_t_srv' undeclared (first use in this function) gnome-vfs-dns-sd.c:668: `ns_t_txt' undeclared (first use in this function) gmake[3]: *** [gnome-vfs-dns-sd.lo] Error 1 gmake[3]: Leaving directory `/aux/adrian/build/gnome-vfs-2.8.3/libgnomevfs' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/aux/adrian/build/gnome-vfs-2.8.3/libgnomevfs' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/aux/adrian/build/gnome-vfs-2.8.3' gmake: *** [all] Error 2
Can you do a find /usr/include -name "*.h" | xargs grep NS_MAXDNAME and find /usr/include -name "*.h" | xargs grep NS_HFIXEDSZ ?
zero matches
Do you have a arpa/nameser.h file, or something with a similar name?
Created attachment 35762 [details] /usr/include/arpa/nameser.h from NetBSD 1.5
Ok, so it seems that the correspondance is: NS_MAXDNAME <=> MAXDNAME NS_HFIXEDSZ <=> HFIXEDSZ ns_c_in <=> C_IN ns_t_any <=> T_ANY ns_t_srv <=> T_SRV ns_t_txt <=> T_TXT ns_t_ptr <=> T_PTR All these const are defined in nameser_compat.h on my system.
Created attachment 35763 [details] [review] Proposed patch Can you test this patch and tell if it helps? It compiles on my linux box at least.
Thanks, I can confirm this patch fixes compilation.
Created attachment 35785 [details] [review] another patch Can you test that patch too ? Alex prefers something like that.
I can confirm, this new patch also fixes the compilation.
Fixed in CVS HEAD, thanks for all the testing