Browse Source
Instead of copying the header files around, change the triplet canonicalization function to correctly remove version numbers for darwin triplets.pull/104/head
2 changed files with 26 additions and 23 deletions
@ -0,0 +1,25 @@ |
|||
--- libgpg-error-1.27_orig/src/mkheader.c 2017-02-28 13:32:33.000000000 +0100
|
|||
+++ libgpg-error-1.27/src/mkheader.c 2020-01-23 11:36:50.000000000 +0100
|
|||
@@ -107,7 +107,21 @@
|
|||
return xstrdup (lastalias); |
|||
} |
|||
} |
|||
- return xstrdup (triplet);
|
|||
+ /* Darwin triplet de-versioning */
|
|||
+ char *res_triplet = xstrdup (triplet);
|
|||
+
|
|||
+ char *triplet_last = strrchr(res_triplet, '-');
|
|||
+ if (triplet_last == NULL) {
|
|||
+ fprintf (stderr, PGM ": unexpected host triplet missing any separator: '%s'",
|
|||
+ res_triplet);
|
|||
+ exit (1);
|
|||
+ }
|
|||
+ triplet_last++; /* Advance past the dash */
|
|||
+ if (strncmp("darwin", triplet_last, 6) == 0) {
|
|||
+ triplet_last[6] = '\0';
|
|||
+ }
|
|||
+
|
|||
+ return res_triplet;
|
|||
} |
|||
|
|||
|
|||
Loading…
Reference in new issue