mirror of
https://github.com/zeek/zeek.git
synced 2025-10-03 23:28:20 +00:00
Fix build on systems that already have ntohll/htonll
BIT-1234 #close
This commit is contained in:
parent
a3b2e3a2b4
commit
121fcdbb5b
3 changed files with 10 additions and 0 deletions
|
@ -180,8 +180,11 @@ extern uint32 extract_uint32(const u_char* data);
|
|||
|
||||
inline double ntohd(double d) { return d; }
|
||||
inline double htond(double d) { return d; }
|
||||
|
||||
#ifndef HAVE_BYTEORDER_64
|
||||
inline uint64 ntohll(uint64 i) { return i; }
|
||||
inline uint64 htonll(uint64 i) { return i; }
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
|
@ -207,6 +210,7 @@ inline double ntohd(double d)
|
|||
|
||||
inline double htond(double d) { return ntohd(d); }
|
||||
|
||||
#ifndef HAVE_BYTEORDER_64
|
||||
inline uint64 ntohll(uint64 i)
|
||||
{
|
||||
u_char c;
|
||||
|
@ -224,6 +228,7 @@ inline uint64 ntohll(uint64 i)
|
|||
}
|
||||
|
||||
inline uint64 htonll(uint64 i) { return ntohll(i); }
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue