You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
vsftpd: update to replace old setrlimit call
Closes: https://trac.macports.org/ticket/67134
This commit is contained in:
committed by
Clemens Lang
parent
6004f94c63
commit
9b9477b9ab
+3
-2
@@ -4,7 +4,7 @@ PortSystem 1.0
|
||||
|
||||
name vsftpd
|
||||
version 3.0.5
|
||||
revision 0
|
||||
revision 1
|
||||
categories net
|
||||
license {GPL-2 OpenSSLException}
|
||||
platforms darwin
|
||||
@@ -26,7 +26,8 @@ checksums rmd160 f308bbd0b214a1af7438b1f84e9b12cacf06858d \
|
||||
patchfiles patch-sysdeputil.c.diff \
|
||||
patch-vsf_findlibs.sh.diff \
|
||||
patch-vsftpd.conf.diff \
|
||||
patch-Makefile.diff
|
||||
patch-Makefile.diff \
|
||||
patch-sysutil.c.diff
|
||||
|
||||
configure {
|
||||
reinplace "s|/etc/|${prefix}/etc/|g" \
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
diff --git sysutil.c.old sysutil.c
|
||||
index ff8885b..c465b99 100644
|
||||
--- sysutil.c.old
|
||||
+++ sysutil.c
|
||||
@@ -2792,6 +2792,7 @@ vsf_sysutil_getuid(void)
|
||||
void
|
||||
vsf_sysutil_set_address_space_limit(unsigned long bytes)
|
||||
{
|
||||
+#if! defined(__APPLE__)
|
||||
/* Unfortunately, OpenBSD is missing RLIMIT_AS. */
|
||||
#ifdef RLIMIT_AS
|
||||
int ret;
|
||||
@@ -2807,12 +2808,14 @@ vsf_sysutil_set_address_space_limit(unsigned long bytes)
|
||||
die("setrlimit");
|
||||
}
|
||||
#endif /* RLIMIT_AS */
|
||||
+#endif
|
||||
(void) bytes;
|
||||
}
|
||||
|
||||
void
|
||||
vsf_sysutil_set_no_fds()
|
||||
{
|
||||
+#if! defined(__APPLE__)
|
||||
int ret;
|
||||
struct rlimit rlim;
|
||||
rlim.rlim_cur = 0;
|
||||
@@ -2822,11 +2825,13 @@ vsf_sysutil_set_no_fds()
|
||||
{
|
||||
die("setrlimit NOFILE");
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
||||
vsf_sysutil_set_no_procs()
|
||||
{
|
||||
+#if! defined(__APPLE__)
|
||||
#ifdef RLIMIT_NPROC
|
||||
int ret;
|
||||
struct rlimit rlim;
|
||||
@@ -2838,6 +2843,7 @@ vsf_sysutil_set_no_procs()
|
||||
die("setrlimit NPROC");
|
||||
}
|
||||
#endif
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
||||
Reference in New Issue
Block a user