aboutsummaryrefslogtreecommitdiff
path: root/net/socks5/files
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2000-08-30 19:43:28 +0000
committerWarner Losh <imp@FreeBSD.org>2000-08-30 19:43:28 +0000
commitba3406cf49384a4940750cfa0bcce2dc5ea8bc66 (patch)
tree8bde13e192b682342e985fe7b9b27b3e340fb113 /net/socks5/files
parent7ad52d0d9db08a9d753b194a6b5f2e9ae5b75e45 (diff)
downloadports-ba3406cf49384a4940750cfa0bcce2dc5ea8bc66.tar.gz
ports-ba3406cf49384a4940750cfa0bcce2dc5ea8bc66.zip
Notes
Diffstat (limited to 'net/socks5/files')
-rw-r--r--net/socks5/files/patch-aa9
-rw-r--r--net/socks5/files/patch-ak46
2 files changed, 14 insertions, 41 deletions
diff --git a/net/socks5/files/patch-aa b/net/socks5/files/patch-aa
index 87cc2585803e..2a50a26f15bc 100644
--- a/net/socks5/files/patch-aa
+++ b/net/socks5/files/patch-aa
@@ -1,14 +1,5 @@
--- lib/rld.c.orig Wed Aug 4 04:59:28 1999
+++ lib/rld.c Mon Feb 21 03:55:45 2000
-@@ -143,7 +143,7 @@
- static void DGetOriginalFunc(void **fptr, char *name, int libmask) {
- /* Synchronize access to func and lib opening functions if we can... */
-
--#ifndef __FreeBSD__
-+#if !defined(__FreeBSD__) || __FreeBSD__ != 2
- name++;
- #endif
-
@@ -197,6 +197,26 @@
lsInRLDFunctions = 0;
S5LogUpdate(S5LogDefaultHandle, S5_LOG_DEBUG(10), 0, "RLD: gethostbyname2 results: %s %s", name, hp?hp->h_name:"???");
diff --git a/net/socks5/files/patch-ak b/net/socks5/files/patch-ak
index e94333601db1..3322c3cb11be 100644
--- a/net/socks5/files/patch-ak
+++ b/net/socks5/files/patch-ak
@@ -1,30 +1,24 @@
---- lib/hostname.c.orig Wed Aug 4 04:59:29 1999
-+++ lib/hostname.c Tue Feb 22 09:51:48 2000
+--- lib/hostname.c.orig Wed Aug 16 09:38:40 2000
++++ lib/hostname.c Wed Aug 30 13:27:33 2000
@@ -17,6 +17,11 @@
#define S5_HOSTLIST_SIZE 256
#define S5_HOSTALIASES_SIZE 16
- #define S5_FAKEHOSTFILE ".s5fakehost"
-+
+
+/* wrapper for KAME-special getnameinfo() */
+#ifndef NI_WITHSCOPEID
+#define NI_WITHSCOPEID 0
+#endif
-
++
struct hostEntry {
char name[S5_HOSTNAME_SIZE];
-@@ -171,7 +176,7 @@
- strncpy(hostname, name, MIN(strlen(name), S5_HOSTNAME_SIZE-1));
- hostname[MIN(strlen(name), S5_HOSTNAME_SIZE-1)] = '\0';
-
-- lseek(fd, (j-1)*256+sizeof(int), SEEK_SET);
-+ lseek(fd, (j-1)*S5_HOSTNAME_SIZE+sizeof(int), SEEK_SET);
- if (REAL(write)(fd, hostname, sizeof(hostname)) != sizeof(hostname)) {
- S5LogUpdate(S5LogDefaultHandle, S5_LOG_ERROR, 0, "GetHostFromFile: write table failed %m");
- SetWriteLock(0);
-@@ -402,6 +407,129 @@
- }
- #endif
-
+ };
+@@ -398,6 +403,129 @@
+ lsInWrapFunction = 0;
+ lsInWrapHostname = 0;
+ return &h;
++}
++#endif
++
+#if defined(HAVE_GETADDRINFO) && defined(HAVE_GETNAMEINFO)
+/* wrapper around the getaddrinfo call. */
+/* similar to getaddrinfo() except for: */
@@ -145,18 +139,6 @@
+ lsInWrapFunction = 0;
+ lsInWrapHostname = 0;
+ return 0;
-+}
-+#endif
-+
- int lsGetCachedAddress(const char *name, S5NetAddr *na) {
- int i;
- char hostname[S5_HOSTNAME_SIZE];
-@@ -472,7 +600,7 @@
-
- if (fd > 0) {
- SetReadLock(1);
-- lseek(fd, (i-1)*256+sizeof(int), SEEK_SET);
-+ lseek(fd, (i-1)*S5_HOSTNAME_SIZE+sizeof(int), SEEK_SET);
+ }
+ #endif
- if (REAL(read)(fd, hostname, len) != len) {
- S5LogUpdate(S5LogDefaultHandle, S5_LOG_ERROR, 0, "lsGetCachedHostname: read fake table failed %m");