diff --git a/CHANGES b/CHANGES
index a03f5cc..b9ee5d5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,11 +17,14 @@ Corrections:
 Building:
 	Disabling certain features during configure could break build process.
 
+Porting:
+	Fix for old FreeBSD.
+
 Testing:
 	test.sh produces file results.txt with columns of test numbers, names,
 	and results.
 
-	Fixed a few testing issues
+	Fixed a few testing issues.
 
 ####################### V 1.8.0.2:
 
diff --git a/compat.h b/compat.h
index 72e73c7..ecfa27c 100644
--- a/compat.h
+++ b/compat.h
@@ -98,6 +98,10 @@ typedef int sig_atomic_t;
 #  define SOL_IPV6 IPPROTO_IPV6
 #endif
 
+#ifndef EAI_NODATA
+#  define EAI_NODATA 7 	/* for old FreeBSD */
+#endif
+
 #define F_uint8_t "%hu"
 #define F_uint8_x "%02hx"
 #define F_int8_t  "%hd"