1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 22:54:55 +00:00
serenity/Ports/lrzip/patches/0001-Remove-Linux-specific-code.patch
2023-03-13 13:53:58 +01:00

39 lines
1.4 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Fabian Dellwing <fabian.dellwing@gmail.com>
Date: Sat, 11 Mar 2023 16:18:09 +0100
Subject: [PATCH] Remove Linux specific code
---
main.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/main.c b/main.c
index eb0985feb1f537533f9f6a983fa3c0e39de730bf..be172ee0758d7da6e8cefa2bf6e318e7b50b7ef5 100644
--- a/main.c
+++ b/main.c
@@ -119,7 +119,9 @@ static void usage(bool compat)
}
if (!compat)
print_output(" -L, --level level set lzma/bzip2/gzip compression level (1-9, default 7)\n");
+#ifndef __serenity__
print_output(" -N, --nice-level value Set nice value to value (default %d)\n", compat ? 0 : 19);
+#endif
print_output(" -p, --threads value Set processor count to override number of threads\n");
print_output(" -m, --maxram size Set maximum available ram in hundreds of MB\n");
print_output(" overrides detected amount of available ram\n");
@@ -449,12 +451,14 @@ int main(int argc, char *argv[])
failure("Extra characters after ramsize: \'%s\'\n", endptr);
break;
case 'N':
+#ifndef __serenity__
nice_set = true;
control->nice_val = strtol(optarg, &endptr, 10);
if (control->nice_val < PRIO_MIN || control->nice_val > PRIO_MAX)
failure("Invalid nice value (must be %d...%d)\n", PRIO_MIN, PRIO_MAX);
if (*endptr)
failure("Extra characters after nice level: \'%s\'\n", endptr);
+#endif
break;
case 'o':
if (control->outdir)