From 1289633f3af3ded3ac643b838fd3927e09b0cb3b Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 16 May 2023 08:47:07 +1200 Subject: [PATCH] gdb: Bring in upstream fix for build error On systems that lack pread64() (e.g. musl) the following build error is observed. src/gdb/gdbserver/linux-low.cc:5393:45: error: expected ':' before ')' token src/gdb/gdbserver/linux-low.cc:5393:45: error: expected primary-expression before ')' token src/gdb/gdbserver/linux-low.cc:5393:45: error: expected ':' before ')' token src/gdb/gdbserver/linux-low.cc:5393:45: error: expected primary-expression before ')' token Bring in the upstream fix for this error. Signed-off-by: Chris Packham --- ...low.cc-Fix-a-typo-in-ternary-operato.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/gdb/13.1/0000-gdbserver-linux-low.cc-Fix-a-typo-in-ternary-operato.patch diff --git a/packages/gdb/13.1/0000-gdbserver-linux-low.cc-Fix-a-typo-in-ternary-operato.patch b/packages/gdb/13.1/0000-gdbserver-linux-low.cc-Fix-a-typo-in-ternary-operato.patch new file mode 100644 index 00000000..0316d0db --- /dev/null +++ b/packages/gdb/13.1/0000-gdbserver-linux-low.cc-Fix-a-typo-in-ternary-operato.patch @@ -0,0 +1,21 @@ +From 2e977d9901393ea1bacbe1896af0929e968bc811 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 22 Feb 2023 16:28:22 -0800 +Subject: [PATCH] gdbserver/linux-low.cc: Fix a typo in ternary operator + +Signed-off-by: Khem Raj +--- + gdbserver/linux-low.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gdbserver/linux-low.cc ++++ b/gdbserver/linux-low.cc +@@ -5390,7 +5390,7 @@ + if (lseek (fd, memaddr, SEEK_SET) != -1) + bytes = (readbuf != nullptr + ? read (fd, readbuf, len) +- ? write (fd, writebuf, len)); ++ : write (fd, writebuf, len)); + #endif + + if (bytes < 0)