--- a/src/gcc/ada/gsocket.h
+++ b/src/gcc/ada/gsocket.h
@@ -225,7 +225,7 @@
 # define Need_Netdb_Buffer 0
 #endif
 
-#if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__)
+#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__vxworks) || defined(__rtems__) || defined(__GNU__)
 # define Has_Sockaddr_Len 1
 #else
 # define Has_Sockaddr_Len 0
