ports/lang/libhx/files/patch-src_socket.c
Alexey Dokuchaev 441a956e5f lang/libhx: the port had been updated (+)
- Update libHX to version 4.2
- Sadly, the author no longer hosts the project on SourceForge
  but on his own site instead, this affects MASTER_SITES and
  WWW line in the port description
- Disable getsockopt(SO_BINDTODEVICE) call for now as FreeBSD
  does not implement this socket option (patches welcome)
- While here, assume maintainership of the port
2021-10-20 02:47:19 +00:00

18 lines
509 B
C

--- src/socket.c.orig 2021-10-17 13:36:53 UTC
+++ src/socket.c
@@ -54,6 +54,7 @@ static int try_sk_from_env(int fd, const struct addrin
return -1;
if (intf == nullptr)
return fd;
+#ifdef SO_BINDTODEVICE
char ifname[32];
optlen = sizeof(ifname);
ret = getsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, ifname, &optlen);
@@ -65,6 +66,7 @@ static int try_sk_from_env(int fd, const struct addrin
ifname[sizeof(ifname)-1] = '\0';
if (strcmp(intf, ifname) != 0)
return -1;
+#endif
return fd;
}