From 1c910720bf707e7006e8e89913681fb3ece05ee7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 22 Mar 2024 20:38:03 +0100 Subject: [PATCH] Fix "Support for AIX" (#942) Slightly modified patch from @michaelbaeuerle (issue #942). --- src/drivers/Unix/Fl_Unix_System_Driver.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/Unix/Fl_Unix_System_Driver.cxx b/src/drivers/Unix/Fl_Unix_System_Driver.cxx index 9213db005..be337fce4 100644 --- a/src/drivers/Unix/Fl_Unix_System_Driver.cxx +++ b/src/drivers/Unix/Fl_Unix_System_Driver.cxx @@ -275,10 +275,9 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser // http://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.basetechref/doc/basetrf1/mntctl.htm int res = -1, len; char *list = NULL, *name; - struct vmount *vp; // We always have the root filesystem - add("/", icon); + browser->add("/", icon); // Get the required buffer size for the vmount structures res = mntctl(MCTL_QUERY, sizeof(len), (char *) &len); if (!res) { @@ -292,7 +291,8 @@ int Fl_Unix_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser if (0 >= res) { res = -1; } else { - for (int i = 0, vp = (struct vmount *) list; i < res; ++i) { + struct vmount *vp = (struct vmount *) list; + for (int i = 0; i < res; ++i) { name = (char *) vp + vp->vmt_data[VMT_STUB].vmt_off; strlcpy(filename, name, lname); // Skip the already added root filesystem