inetutils: disable fdsan for "whois"
https://github.com/termux/termux-packages/issues/5980
This commit is contained in:
parent
7c5960ebe2
commit
bb62878def
@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Collection of common network programs"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.9.4
|
||||
TERMUX_PKG_REVISION=10
|
||||
TERMUX_PKG_REVISION=11
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/inetutils/inetutils-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=849d96f136effdef69548a940e3e0ec0624fc0c81265296987986a0dd36ded37
|
||||
TERMUX_PKG_DEPENDS="readline"
|
||||
|
30
packages/inetutils/disable-fdsan.patch
Normal file
30
packages/inetutils/disable-fdsan.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff -uNr inetutils-1.9.4/whois/whois.c inetutils-1.9.4.mod/whois/whois.c
|
||||
--- inetutils-1.9.4/whois/whois.c 2015-03-31 18:40:50.000000000 +0300
|
||||
+++ inetutils-1.9.4.mod/whois/whois.c 2021-04-10 16:58:42.989309373 +0300
|
||||
@@ -49,6 +49,9 @@
|
||||
#include <whois.h>
|
||||
#include "xalloc.h"
|
||||
|
||||
+#include <android/fdsan.h>
|
||||
+#include <dlfcn.h>
|
||||
+
|
||||
/* Global variables */
|
||||
int sockfd, verb = 0;
|
||||
struct obstack query_stk;
|
||||
@@ -207,6 +210,16 @@
|
||||
char *qstring;
|
||||
char *p;
|
||||
|
||||
+ // For Android 11+.
|
||||
+ void *lib_handle = dlopen("libc.so", RTLD_LAZY);
|
||||
+ if (lib_handle) {
|
||||
+ void (*set_fdsan_error_level)(enum android_fdsan_error_level newlevel) = dlsym(lib_handle, "android_fdsan_set_error_level");
|
||||
+ if (set_fdsan_error_level) {
|
||||
+ set_fdsan_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
|
||||
+ }
|
||||
+ dlclose(lib_handle);
|
||||
+ }
|
||||
+
|
||||
set_program_name (argv[0]);
|
||||
|
||||
#ifdef ENABLE_NLS
|
Loading…
Reference in New Issue
Block a user