Skip to content

Commit

Permalink
byteorder: OpenBSD uses the same endian header as Linux
Browse files Browse the repository at this point in the history
Original author: Antoine Jacoutot, openbsd/ports@864539e
  • Loading branch information
anatoli26 committed Jul 31, 2020
1 parent be10290 commit 6df5be0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/byteorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,10 @@

/* http://stackoverflow.com/a/4410728/94253 */

#if defined(__linux__)
#if defined(__linux__) || defined(__OpenBSD__)
# include <endian.h>
#elif defined(__FreeBSD__) || defined(__NetBSD__)
# include <sys/endian.h>
#elif defined(__OpenBSD__)
# include <sys/types.h>
# define be16toh(x) betoh16(x)
# define be32toh(x) betoh32(x)
# define be64toh(x) betoh64(x)
#endif

/* 64-bit host/network byte-order swap macros */
Expand Down

0 comments on commit 6df5be0

Please sign in to comment.