Skip to content

Commit 643d6b4

Browse files
committed
Add additional macro support for addition BSD systems.
1 parent 3f3b9f3 commit 643d6b4

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/hdr_endian.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,20 @@
4848

4949
# include <sys/endian.h>
5050

51+
#ifndef be16toh
5152
# define be16toh(x) betoh16(x)
5253
# define le16toh(x) letoh16(x)
54+
#endif
5355

56+
#ifndef be32toh
5457
# define be32toh(x) betoh32(x)
5558
# define le32toh(x) letoh32(x)
59+
#endif
5660

61+
#ifndef be64toh
5762
# define be64toh(x) betoh64(x)
5863
# define le64toh(x) letoh64(x)
64+
#endif
5965

6066
#elif defined(__WINDOWS__)
6167

src/hdr_time.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void hdr_getnow(hdr_timespec* ts)
6262
hdr_gettime(ts);
6363
}
6464

65-
#elif defined(__linux__) || defined(__CYGWIN__) || defined(__OpenBSD__)
65+
#elif defined(__linux__) || defined(__CYGWIN__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
6666

6767

6868
void hdr_gettime(hdr_timespec* t)

0 commit comments

Comments
 (0)