X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fnames-net.c;h=95a6fd2654cd26cb378efad050b8fbd225bc1e07;hb=4582426202ad6ac6539305dae2c0b70016f014f4;hp=16010300efd52b74c531f35abaf1769dcacd8510;hpb=31941cb7acbf330de25df8c0c95c830d2f4b81d2;p=pciutils.git diff --git a/lib/names-net.c b/lib/names-net.c index 1601030..95a6fd2 100644 --- a/lib/names-net.c +++ b/lib/names-net.c @@ -8,12 +8,21 @@ #include #include +#include #include "internal.h" #include "names.h" #ifdef PCI_USE_DNS +/* + * Our definition of BYTE_ORDER confuses arpa/nameser_compat.h on + * Solaris so we must undef it before including arpa/nameser.h. + */ +#ifdef PCI_OS_SUNOS +#undef BYTE_ORDER +#endif + #include #include #include @@ -187,7 +196,7 @@ char default: return NULL; } - sprintf(dnsname, "%s.%s", name, domain); + sprintf(dnsname, "%.100s.%.100s", name, domain); a->debug("Resolving %s\n", dnsname); if (!resolver_inited)