From: Matthew R. Trower Date: Mon, 4 Jun 2018 05:34:52 +0000 (-0500) Subject: Fix imake segfault on OpenIndiana X-Git-Tag: 2.2.4a~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=650ce0768fd2282db9af841d4833fa574ebed592;p=oweals%2Fcde.git Fix imake segfault on OpenIndiana Version string changed in distributed GCC6, confusing get_sun_compiler_versions(). --- 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,