-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
haiku: add wrappers for ntohl et al.
* These are defined as macros.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <netinet/in.h> | ||
|
||
static uint32_t my_htonl(uint32_t x) { return htonl(x); } | ||
static uint16_t my_htons(uint16_t x) { return htons(x); } | ||
static uint32_t my_ntohl(uint32_t x) { return ntohl(x); } | ||
static uint32_t my_ntohs(uint16_t x) { return ntohs(x); } | ||
|
||
#undef htonl | ||
#undef htons | ||
#undef ntohl | ||
#undef ntohs | ||
|
||
uint32_t htonl(uint32_t x) { return my_htonl(x); } | ||
uint32_t htons(uint16_t x) { return my_htons(x); } | ||
uint32_t ntohl(uint32_t x) { return my_ntohl(x); } | ||
uint32_t ntohs(uint16_t x) { return my_ntohs(x); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,9 @@ library | |
temporary | ||
|
||
if os(haiku) | ||
c-sources: | ||
cbits/swap.c | ||
|
||
extra-libraries: | ||
network | ||
|
||
|