Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
NTPsec
ntpsec
Commits
053ffd8d
Commit
053ffd8d
authored
Jan 02, 2017
by
Eric S. Raymond
Browse files
Inset the right header to declare htonl/ntohl.
parent
c76b10db
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/ntp_fp.h
View file @
053ffd8d
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment