Index: xdmf-3.0+git20190531/core/XdmfSystemUtils.cpp
===================================================================
--- xdmf-3.0+git20190531.orig/core/XdmfSystemUtils.cpp
+++ xdmf-3.0+git20190531/core/XdmfSystemUtils.cpp
@@ -57,17 +57,19 @@ XdmfSystemUtils::getRealPath(const std::
   xmlFreeURI(ref);
   return realPath;
 #else
-  char realPath[PATH_MAX];
-  char *rp = realpath(ref->path, realPath);
-  if (rp == 0)
+  std::string ret;
+  char *rp = realpath(ref->path, NULL);
+  if (rp != 0)
   {
-     //indicates a failure that we are silently ignoring
-     //TODO: realPath is now undefined but in practice
-     //ends up path.c_str()
-     rp = realPath;
+     ret = std::string(rp);
+     free(rp);
   }
-  xmlFreeURI(ref);
-  return std::string(rp);
+  else
+  {
+     ret = std::string(ref->path);
+     xmlFreeURI(ref);
+  }
+  return ret;
 #endif
 }
 #endif
