4 Commits

Author SHA1 Message Date
Taylor R Campbell
e2c0d98965 lib/roken/syslog.c: Initialize hostname to avoid DNS lookups.
Previously, the hostname was initialized to `localhost'.  If it was
not cleared by init_syslog, init_logger_addr (via openlog) would
query gethostbyname to find the IP address of `localhost', which will
essentially always be 127.0.0.1.  But if it was cleared by
init_syslog, init_logger_addr would return 127.0.0.1 anyway.

This way, it always returns 127.0.0.1 in the event of no init_syslog
call, and avoids a DNS lookup.  You can always force a DNS lookup by
passing `localhost' to init_syslog explicitly, of course.

I'm not sure if anything even uses this as a fallback in Heimdal, but
let's avoid leaving a rake to step on.
2024-01-08 10:22:02 -06:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Asanka C. Herath
0ee4597aed Always include <config.h> in roken implementation
Remove unnecessary ifdefs and add <config.h> to dlfcn_w32.c.  This is
required for correct export declarations when building roken as a DLL.
2010-11-23 02:24:38 -05:00
Asanka Herath
d00f9984a5 Make roken build on windows
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2009-11-24 21:42:02 -08:00