pmatilai commented on this pull request.


> +     snprintf(archmarker, sizeof(archmarker), "(%s%s-%s)", elf_machine, 
> elf_endian, elf_bitsize);
+       break;
+    case EM_X86_64:
+       /* This handling for x32 makes me weep inside... */
+       if (ehdr->e_ident[EI_CLASS] == ELFCLASS32) {
+           snprintf(archmarker, sizeof(archmarker), "(%s-%s-%s)", elf_machine, 
"64", "x32");
+       } else {
+           snprintf(archmarker, sizeof(archmarker), "(%s-%s)", elf_machine, 
elf_bitsize);
+       }
+       break;
+    default:
+       snprintf(archmarker, sizeof(archmarker), "(%s-%s)", elf_machine, 
elf_bitsize);
+       break;
+    }
+
+    return strndup(archmarker, strlen(archmarker));

rasprintf() is rpm's local version of asprintf() (so we can rely on it always 
being there), it's used all over rpm codebase -  elfdeps.c included.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/360#discussion_r169100955
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to