diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/Makefile.am | 2 | ||||
-rw-r--r-- | runtime/net.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/Makefile.am b/runtime/Makefile.am index a7a2b91e..4a72eed8 100644 --- a/runtime/Makefile.am +++ b/runtime/Makefile.am @@ -67,7 +67,7 @@ librsyslog_la_SOURCES = \ librsyslog_la_CPPFLAGS = -D_PATH_MODDIR=\"$(pkglibdir)/\" -I$(top_srcdir) $(pthreads_cflags) #librsyslog_la_LDFLAGS = -module -avoid-version -librsyslog_la_LIBADD = +librsyslog_la_LIBADD = -ldl -lrt # # regular expression support diff --git a/runtime/net.c b/runtime/net.c index 43da9fe5..ca12acd8 100644 --- a/runtime/net.c +++ b/runtime/net.c @@ -983,7 +983,7 @@ gethname(struct sockaddr_storage *f, uchar *pszHostFQDN, uchar *ip) assert(pszHostFQDN != NULL); error = getnameinfo((struct sockaddr *)f, SALEN((struct sockaddr *)f), - (char*) ip, sizeof ip, NULL, 0, NI_NUMERICHOST); + (char*) ip, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); if (error) { dbgprintf("Malformed from address %s\n", gai_strerror(error)); |