<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From b7e635efd894116530e4fc15847de0aab5915b7e Mon Sep 17 00:00:00 2001
From: Sergey Fedorov &lt;vital.had@gmail.com&gt;
Date: Thu, 18 May 2023 02:51:49 +0800
Subject: [PATCH] Minor fix-ups for ppc

---
 cctools/misc/strings.c  | 6 +++++-
 ld64/src/ld/Options.cpp | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git cctools/misc/strings.c cctools/misc/strings.c
index e8d62a7..93d8fea 100644
--- cctools/misc/strings.c
+++ cctools/misc/strings.c
@@ -354,7 +354,11 @@ void *cookie)
 	 * If the ofile is not an object file then process it without reguard
 	 * to sections.
 	 */
-	if(ofile-&gt;object_addr == NULL || ofile-&gt;member_type == OFILE_LLVM_BITCODE){
+	if(ofile-&gt;object_addr == NULL
+#ifdef LTO_SUPPORT
+           || ofile-&gt;member_type == OFILE_LLVM_BITCODE
+#endif /* LTO_SUPPORT */
+           ){
 	    if(ofile-&gt;file_type == OFILE_FAT &amp;&amp; ofile-&gt;arch_flag.cputype != 0){
 		if(ofile-&gt;fat_header-&gt;magic == FAT_MAGIC_64){
 		    addr = ofile-&gt;file_addr +
diff --git ld64/src/ld/Options.cpp ld64/src/ld/Options.cpp
index 0ab643d..be01832 100644
--- ld64/src/ld/Options.cpp
+++ ld64/src/ld/Options.cpp
@@ -1704,7 +1704,7 @@ uint32_t Options::parseVersionNumber32(const char* versionString)
 			z = strtoul(&amp;end[1], &amp;end, 10);
 		}
 	}
-	if ( (*end != '\0') || (x &gt; 0xffff) || (y &gt; 0xff) || (z &gt; 0xff) )
+	if ( (x &gt; 0xffff) || (y &gt; 0xff) || (z &gt; 0xff) )
 		throwf("malformed 32-bit x.y.z version number: %s", versionString);
 
 	return (x &lt;&lt; 16) | ( y &lt;&lt; 8 ) | z;
-- 
2.40.1

</pre></body></html>