[Git][NTPsec/ntpsec][master] Inset the right header to declare htonl/ntohl.

Eric S. Raymond gitlab at mg.gitlab.com
Mon Jan 2 18:08:04 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
053ffd8d by Eric S. Raymond at 2017-01-02T13:07:53-05:00
Inset the right header to declare htonl/ntohl.

- - - - -


1 changed file:

- include/ntp_fp.h


Changes:

=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -5,6 +5,8 @@
 #ifndef GUARD_NTP_FP_H
 #define GUARD_NTP_FP_H
 
+#include <arpa/inet.h>
+
 #include "ntp_types.h"
 
 /*
@@ -96,14 +98,12 @@ typedef uint32_t u_fp;
 #define	NTOHS_FP(x)	(ntohl(x))
 
 static inline l_fp htonl_fp(l_fp lfp) {
-    extern uint32_t htonl(uint32_t hostlong);
     setlfpuint(lfp, htonl(lfpuint(lfp)));
     setlfpfrac(lfp, htonl(lfpfrac(lfp)));
     return lfp;
 }
 
 static inline l_fp ntohl_fp(l_fp lfp) {
-    extern uint32_t ntohl(uint32_t hostlong);
     setlfpuint(lfp, ntohl(lfpuint(lfp)));
     setlfpfrac(lfp, ntohl(lfpfrac(lfp)));
     return lfp;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/053ffd8d46fc0a69b6076a65f15583869ddde37e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170102/25ef602e/attachment.html>


More information about the vc mailing list