1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

- Add patch, fix build on DragonFly [1]

https://github.com/lsalzman/enet/issues/42

PR:		197610
Submitted by:	jbeich [1]
This commit is contained in:
Rusmir Dusko 2015-02-14 10:48:24 +00:00
parent f8a1725d8b
commit 6dadcea6be
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=378956

View File

@ -0,0 +1,20 @@
--- unix.c.orig 2014-04-24 09:49:05.000000000 +0200
+++ unix.c 2015-02-14 11:32:25.346006823 +0100
@@ -104,7 +104,7 @@
char buffer [2048];
int errnum;
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else
hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
@@ -162,7 +162,7 @@
in.s_addr = address -> host;
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
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);