diff -Naur openjdk.orig/jdk/make/tools/freetypecheck/freetypecheck.c openjdk/jdk/make/tools/freetypecheck/freetypecheck.c --- openjdk.orig/jdk/make/tools/freetypecheck/freetypecheck.c 2021-02-06 12:58:18.017099332 +0100 +++ openjdk/jdk/make/tools/freetypecheck/freetypecheck.c 2021-02-06 12:59:16.289100347 +0100 @@ -26,6 +26,8 @@ /* Test program for freetype sanity check. Prints "Failed" messages to STDOUT if check fails. */ +#define _GNU_SOURCE +#include #include "ft2build.h" #include FT_FREETYPE_H @@ -42,7 +44,7 @@ QUOTEMACRO(REQUIRED_FREETYPE_VERSION)); printf("Detected freetype headers: %s\n", v); - if (strcmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { + if (strverscmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { printf("Failed: headers are too old.\n"); } @@ -51,7 +53,7 @@ sprintf(v, "%d.%d.%d", major, minor, patch); printf("Detected freetype library: %s\n", v); - if (strcmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { + if (strverscmp(v, QUOTEMACRO(REQUIRED_FREETYPE_VERSION)) < 0) { printf("Failed: too old library.\n"); }