ht2crack2: replace GLIB qsort_r by portable qsort

This commit is contained in:
Philippe Teuwen
2025-09-11 16:37:03 +02:00
parent d6f1b3a064
commit 92b78178ec

View File

@@ -354,7 +354,7 @@ static void makedirs(void) {
}
}
static int datacmp(const void *p1, const void *p2, void *dummy) {
static int datacmp(const void *p1, const void *p2) {
unsigned char *d_1 = (unsigned char *)p1;
unsigned char *d_2 = (unsigned char *)p2;
@@ -420,8 +420,7 @@ static void *sorttable(void *dd) {
close(fdin);
// sort it
void *dummy = NULL; // clang
qsort_r(table, numentries, DATASIZE, datacmp, dummy);
qsort(table, numentries, DATASIZE, datacmp);
// write to file
snprintf(outfile, sizeof(outfile), "sorted/%02x/%02x.bin", i, j);