- Fixed include location of endian.h on FreeBSD (found by Gabriel)
diff --git a/ChangeLog b/ChangeLog
index aab562c..c6d00fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
* Fixed typo in name of POLARSSL_ERR_RSA_OUTPUT_TOO_LARGE.
Bug fixes
+ * Fixed include location of endian.h on FreeBSD (found by
+ Gabriel)
* Fixed HMAC-MD2 by modifying md2_starts(), so that the
required HMAC ipad and opad variables are not cleared.
(found by code coverage tests)
diff --git a/library/net.c b/library/net.c
index 41bb2d9..b213f24 100644
--- a/library/net.c
+++ b/library/net.c
@@ -55,7 +55,11 @@
#include <fcntl.h>
#include <netdb.h>
#include <errno.h>
+#if defined(__FreeBSD__)
+#include <sys/endian.h>
+#else
#include <endian.h>
+#endif
#endif