aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
diff options
context:
space:
mode:
authorKoen Vandeputte <koen.vandeputte@ncentric.com>2016-12-22 17:17:04 +0100
committerFelix Fietkau <nbd@nbd.name>2016-12-26 11:17:33 +0100
commit2912f9f2a2e5997df069d38e20d85ff4cc51acef (patch)
tree783e8cd472936ac1ca9378f16fb3189a486e7a48 /toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
parentb97c933ffb5aae338351a1db12a3f7cf5234f5c7 (diff)
downloadupstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.tar.gz
upstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.tar.bz2
upstream-2912f9f2a2e5997df069d38e20d85ff4cc51acef.zip
musl: backport various post-1.1.15 fixes
Backport most important fixes up to latest HEAD - Taken post-commit reverts/fixes into account Compile tested Run-tested on cns3xxx & imx6 targets Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch')
-rw-r--r--toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch b/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
new file mode 100644
index 0000000000..651d58e955
--- /dev/null
+++ b/toolchain/musl/patches/052-fix-getopt_long_only-misinterpreting-as-an-option.patch
@@ -0,0 +1,24 @@
+From b24f1d2520c87077cef21e085893e5f3c565a6df Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Thu, 20 Oct 2016 12:13:33 -0400
+Subject: fix getopt_long_only misinterpreting "--" as an option
+
+---
+ src/misc/getopt_long.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c
+index 480c001..c6e1462 100644
+--- a/src/misc/getopt_long.c
++++ b/src/misc/getopt_long.c
+@@ -53,7 +53,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring
+ {
+ optarg = 0;
+ if (longopts && argv[optind][0] == '-' &&
+- ((longonly && argv[optind][1]) ||
++ ((longonly && argv[optind][1] && argv[optind][1] != '-') ||
+ (argv[optind][1] == '-' && argv[optind][2])))
+ {
+ int colon = optstring[optstring[0]=='+'||optstring[0]=='-']==':';
+--
+cgit v0.11.2