From 650ce0768fd2282db9af841d4833fa574ebed592 Mon Sep 17 00:00:00 2001 From: "Matthew R. Trower" Date: Mon, 4 Jun 2018 00:34:52 -0500 Subject: [PATCH] Fix imake segfault on OpenIndiana Version string changed in distributed GCC6, confusing get_sun_compiler_versions(). --- cde/config/imake/imake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c index 7c429e42..14422e64 100644 --- a/cde/config/imake/imake.c +++ b/cde/config/imake/imake.c @@ -1157,7 +1157,7 @@ get_sun_compiler_versions(FILE *inFile) strncat (cmd, " --version 2>&1", 15); if ((ccproc = popen (cmd, "r")) != NULL) { if (fgets (buf, PATH_MAX, ccproc) != NULL) { - vptr = strrchr (buf, 'G'); + vptr = strrchr (buf, ')'); for (; !isdigit(*vptr); vptr++); ret = sscanf (vptr, "%d.%d", &cmajor, &cminor); fprintf (inFile, @@ -1182,7 +1182,7 @@ get_sun_compiler_versions(FILE *inFile) strncat (cmd, " --version 2>&1", 15); if ((ccproc = popen (cmd, "r")) != NULL) { if (fgets (buf, PATH_MAX, ccproc) != NULL) { - vptr = strrchr (buf, 'G'); + vptr = strrchr (buf, ')'); for (; !isdigit(*vptr); vptr++); ret = sscanf (vptr, "%d.%d", &cmajor, &cminor); fprintf (inFile, -- 2.25.1