[Git][NTPsec/ntpsec][master] Minor changes to reduce dependence of Linuxisms and glibcisms.
Eric S. Raymond
gitlab at mg.gitlab.com
Sun Aug 13 14:19:18 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
4d94feb5 by Eric S. Raymond at 2017-08-13T10:18:21-04:00
Minor changes to reduce dependence of Linuxisms and glibcisms.
- - - - -
2 changed files:
- libntp/decodenetnum.c
- ntpd/ntp_control.c
Changes:
=====================================
libntp/decodenetnum.c
=====================================
--- a/libntp/decodenetnum.c
+++ b/libntp/decodenetnum.c
@@ -13,6 +13,11 @@
#include "ntp_stdlib.h"
#include "ntp_assert.h"
+/* This is a glibc thing, not standardized */
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
/*
* decodenetnum convert text IP address and port to sockaddr_u
*
=====================================
ntpd/ntp_control.c
=====================================
--- a/ntpd/ntp_control.c
+++ b/ntpd/ntp_control.c
@@ -2093,7 +2093,7 @@ ctl_putpeer(
strlen(p->hostname));
#ifdef REFCLOCK
if (p->procptr != NULL) {
- char buf1[NI_MAXHOST];
+ char buf1[256];
strlcpy(buf1, refclock_name(p), sizeof(buf1));
ctl_putstr(peer_var[id].text, buf1, strlen(buf1));
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4d94feb53201f3b421c967bb7308088c9af4a23c
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/4d94feb53201f3b421c967bb7308088c9af4a23c
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170813/f7ce7f7f/attachment.html>
More information about the vc
mailing list