From f34d951f28448f172058318e8a54eafd8ccd8dfc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 12 Apr 2021 17:31:52 +0200 Subject: [PATCH] Ports: Fix for building openssh --- Ports/openssh/patches/fnmatch.patch | 20 ++++++++++++++++++++ Ports/openssh/patches/prctl-hack.patch | 12 ++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Ports/openssh/patches/fnmatch.patch create mode 100644 Ports/openssh/patches/prctl-hack.patch diff --git a/Ports/openssh/patches/fnmatch.patch b/Ports/openssh/patches/fnmatch.patch new file mode 100644 index 0000000000..4c6d4c5706 --- /dev/null +++ b/Ports/openssh/patches/fnmatch.patch @@ -0,0 +1,20 @@ +diff -Naur openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676/openbsd-compat/fnmatch.h openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676.serenity/openbsd-compat/fnmatch.h +--- openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676/openbsd-compat/fnmatch.h 2021-04-12 13:48:40.263056972 +0200 ++++ openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676.serenity/openbsd-compat/fnmatch.h 2021-04-12 13:48:03.432331975 +0200 +@@ -34,6 +34,16 @@ + + /* OPENBSD ORIGINAL: include/fnmatch.h */ + ++#ifdef __serenity__ ++#define FNM_NOMATCH 1 /* Match failed. */ ++ ++#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ ++#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ ++#define FNM_PERIOD 0x04 /* Period must be matched by period. */ ++#define FNM_CASEFOLD 0x10 /* Case insensitive search. */ ++#define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ ++#endif ++ + #ifndef HAVE_FNMATCH_H + /* Ensure we define FNM_CASEFOLD */ + #define __BSD_VISIBLE 1 diff --git a/Ports/openssh/patches/prctl-hack.patch b/Ports/openssh/patches/prctl-hack.patch new file mode 100644 index 0000000000..bf6cf5fb1c --- /dev/null +++ b/Ports/openssh/patches/prctl-hack.patch @@ -0,0 +1,12 @@ +diff -Naur openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676/platform-tracing.c openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676.serenity/platform-tracing.c +--- openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676/platform-tracing.c 2020-05-27 02:38:00.000000000 +0200 ++++ openssh-portable-9ca7e9c861775dd6c6312bc8aaab687403d24676.serenity/platform-tracing.c 2021-04-12 13:45:38.662816561 +0200 +@@ -35,7 +35,7 @@ + { + #if defined(HAVE_PRCTL) && defined(PR_SET_DUMPABLE) + /* Disable ptrace on Linux without sgid bit */ +- if (prctl(PR_SET_DUMPABLE, 0) != 0 && strict) ++ if (prctl(PR_SET_DUMPABLE, 0, 0) != 0 && strict) + fatal("unable to make the process undumpable"); + #endif + #if defined(HAVE_SETPFLAGS) && defined(__PROC_PROTECT)