Hi,

I attached a very small patch by Cyril Brulebois that fix the build on 
GNU/kFreeBSD. Can you apply it?

Best regards,

                Gonéri Le Bouder
--- enet-1.0/unix.c	2007-03-11 08:33:46.900128000 +0100
+++ enet-1.0/unix.c	2007-03-11 08:34:54.000000000 +0100
@@ -80,7 +80,7 @@
     char buffer [2048];
     int errnum;
 
-#ifdef linux
+#if defined(linux) || defined(__FreeBSD_kernel__)
     gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
 #else
     hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
@@ -118,7 +118,7 @@
 
     in.s_addr = address -> host;
 
-#ifdef linux
+#if defined(linux) || defined(__FreeBSD_kernel__)
     gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
 #else
     hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum);

Attachment: pgpacMWyKb4F1.pgp
Description: PGP signature

Reply via email to