Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jul 2024 20:19:23 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 97e12aa04d5d - main - net/torsocks: Fix build failure on 15
Message-ID:  <202407272019.46RKJNuD089436@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=97e12aa04d5dc00271ae925f01a4ec0432efb660

commit 97e12aa04d5dc00271ae925f01a4ec0432efb660
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-07-27 20:14:51 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-07-27 20:19:17 +0000

    net/torsocks: Fix build failure on 15
    
    PR:             280467
    Reported by:    Dan Kotowski <dan.kotowski@a9development.com>
---
 net/torsocks/files/patch-src_lib_getpeername.c | 14 +++++++-------
 net/torsocks/files/patch-src_lib_syscall.c     | 16 ++++++++--------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/net/torsocks/files/patch-src_lib_getpeername.c b/net/torsocks/files/patch-src_lib_getpeername.c
index 15bceb1ab32e..571d0ec47450 100644
--- a/net/torsocks/files/patch-src_lib_getpeername.c
+++ b/net/torsocks/files/patch-src_lib_getpeername.c
@@ -1,16 +1,16 @@
 - workaround for https://gitlab.torproject.org/tpo/core/torsocks/-/issues/40023
 
---- src/lib/getpeername.c.orig	2024-07-25 16:31:28 UTC
+--- src/lib/getpeername.c.orig	2022-05-25 14:36:05 UTC
 +++ src/lib/getpeername.c
-@@ -22,6 +22,8 @@
- 
- #include "torsocks.h"
+@@ -92,6 +92,8 @@ libc:
+ 	return tsocks_libc_getpeername(LIBC_GETPEERNAME_ARGS);
+ }
  
 +#if __FreeBSD_cc_version < 1500000
 +
- /* getpeername(2) */
- TSOCKS_LIBC_DECL(getpeername, LIBC_GETPEERNAME_RET_TYPE,
- 		LIBC_GETPEERNAME_SIG)
+ /*
+  * Libc hijacked symbol getpeername(2).
+  */
 @@ -105,3 +107,5 @@ LIBC_GETPEERNAME_DECL
  
  	return tsocks_getpeername(LIBC_GETPEERNAME_ARGS);
diff --git a/net/torsocks/files/patch-src_lib_syscall.c b/net/torsocks/files/patch-src_lib_syscall.c
index 4dc78c547a49..965612662ed3 100644
--- a/net/torsocks/files/patch-src_lib_syscall.c
+++ b/net/torsocks/files/patch-src_lib_syscall.c
@@ -1,8 +1,8 @@
 Patch by Stefan Ehmann, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233736
 
---- src/lib/syscall.c.orig	2018-04-20 15:41:42 UTC
+--- src/lib/syscall.c.orig	2022-05-25 14:36:05 UTC
 +++ src/lib/syscall.c
-@@ -84,7 +84,7 @@ static LIBC_ACCEPT_RET_TYPE handle_accep
+@@ -84,7 +84,7 @@ static LIBC_ACCEPT_RET_TYPE handle_accept(va_list args
  	return tsocks_accept(sockfd, addr, &addrlen);
  }
  
@@ -11,7 +11,7 @@ Patch by Stefan Ehmann, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=23
  /*
   * Handle mmap(2) syscall.
   */
-@@ -457,7 +457,7 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(lon
+@@ -498,7 +498,7 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, 
  		ret = handle_close(args);
  		break;
  	case TSOCKS_NR_MMAP:
@@ -20,8 +20,8 @@ Patch by Stefan Ehmann, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=23
  		/*
  		 * On an 64 bit *BSD system, __syscall(2) should be used for mmap().
  		 * This is NOT suppose to happen but for protection we deny that call.
-@@ -559,6 +559,14 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(lon
- 		ret = handle_memfd_create(args);
+@@ -606,6 +606,14 @@ LIBC_SYSCALL_RET_TYPE tsocks_syscall(long int number, 
+ 		ret = handle_getdents64(args);
  		break;
  #endif /* __linux__ */
 +#if defined(__FreeBSD__)
@@ -33,9 +33,9 @@ Patch by Stefan Ehmann, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=23
 +		break;
 +#endif
  	default:
- 		/*
- 		 * Because of the design of syscall(), we can't pass a va_list to it so
-@@ -633,6 +641,14 @@ LIBC___SYSCALL_RET_TYPE tsocks___syscall
+ 		DBG("[syscall] Unsupported __syscall number %ld. Passing through",
+ 				number);
+@@ -675,6 +683,14 @@ LIBC___SYSCALL_RET_TYPE tsocks___syscall(quad_t number
  		 */
  		ret = handle_bsd_mmap(args);
  		break;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202407272019.46RKJNuD089436>