void-packages/srcpkgs/aircrack-ng/patches/getopt.patch

15 lines
459 B
Diff

argv[1] is a file name argument, musl getopt_long will permute it
to a later position, so skip it for argument parsing.
--- aircrack-ng-1.6/src/airolib-ng/airolib-ng.c.orig
+++ aircrack-ng-1.6/src/airolib-ng/airolib-ng.c
@@ -1309,7 +1309,7 @@
signal(SIGTERM, sighandler);
option = getopt_long(
- argc, argv, "bc:d:e:hi:s:t:v:", long_options, &option_index);
+ argc-1, argv+1, "bc:d:e:hi:s:t:v:", long_options, &option_index);
if (option > 0)
{