summaryrefslogtreecommitdiff
path: root/net/irrd/files/patch-lib_mrt_prefix.c
blob: 28ef751dd7e98a4c6f15b54d4485f007ae0c5ba9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: lib/mrt/prefix.c
diff -u -p lib/mrt/prefix.c.orig lib/mrt/prefix.c
--- lib/mrt/prefix.c.orig	Fri Aug 31 03:10:31 2001
+++ lib/mrt/prefix.c	Mon May  1 12:05:11 2006
@@ -15,7 +15,7 @@
 #include <ws2tcpip.h>
 #endif /* NT */
 
-#ifndef __GLIBC__
+#if !defined(__GLIBC__) && !defined(__FreeBSD__)
 #ifdef __osf__
 
 /* apparently, OSF's gethostby{name,addr}_r's are different, broken, and
@@ -50,7 +50,7 @@ struct hostent  *gethostbyaddr_r
       For the time being, this part tries to convert Linux glibc 2.X
       gethostXX_r into Solaris's that we use to code MRT. -- masaki
     */
-#if __GLIBC__ >= 2
+#if __GLIBC__ >= 2 || (defined(__FreeBSD__) && defined(HAVE_GETHOSTBYNAME_R))
    /* Glibc 2.X
 
     int gethostbyname_r (const char *name, struct hostent *result_buf,