[ntpsec commit] Fix a few more warnings on NetBSD

Hal Murray murray at ntpsec.org
Mon Oct 5 04:20:25 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    c554865c1c4c282b71fbbfdfa2ad6f63d828afec
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=c554865c1c4c282b71fbbfdfa2ad6f63d828afec

Author:    Hal Murray <hmurray at megapathdsl.net>
Date:      Sun Oct  4 21:17:45 2015 -0700

Fix a few more warnings on NetBSD

They have #defines for OTIME_MSG and NTIME_MSG
in /usr/include/utmpx.h

---

 libntp/systime.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libntp/systime.c b/libntp/systime.c
index e6037b9..14f8e21 100644
--- a/libntp/systime.c
+++ b/libntp/systime.c
@@ -504,12 +504,17 @@ step_systime(
 #ifdef OVERRIDE_OTIME_MSG
 # define OTIME_MSG OVERRIDE_OTIME_MSG
 #else
-# define OTIME_MSG	"Old NTP time"
+/* Already defined on NetBSD */
+# ifndef OTIME_MSG
+#  define OTIME_MSG	"Old NTP time"
+# endif
 #endif
 #ifdef OVERRIDE_NTIME_MSG
 # define NTIME_MSG OVERRIDE_NTIME_MSG
 #else
-# define NTIME_MSG	"New NTP time"
+# ifndef NTIME_MSG
+#  define NTIME_MSG	"New NTP time"
+# endif
 #endif
 		struct utmpx utx;
 



More information about the vc mailing list