1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Fix imake segfault on OpenIndiana

Version string changed in distributed GCC6, confusing
get_sun_compiler_versions().
This commit is contained in:
Matthew R. Trower 2018-06-04 00:34:52 -05:00 committed by Jon Trulson
parent fd9e74ae42
commit 650ce0768f

View file

@ -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,