ports/net/wireshark/patches/patch-rawshark_c

15 lines
556 B
Text

Index: rawshark.c
--- rawshark.c.orig
+++ rawshark.c
@@ -570,7 +570,11 @@ main(int argc, char *argv[])
limit.rlim_cur = get_positive_int(ws_optarg, "memory limit");
limit.rlim_max = get_positive_int(ws_optarg, "memory limit");
+#ifdef RLIMIT_AS
if(setrlimit(RLIMIT_AS, &limit) != 0) {
+#else
+ if(setrlimit(RLIMIT_DATA, &limit) != 0) {
+#endif
cmdarg_err("setrlimit() returned error");
ret = INVALID_OPTION;
goto clean_exit;