+#if defined(HAVE_IRIX_OS)
+ /*
+ * From observation, IRIX's acl_get_file() seems to return a
+ * non-NULL acl with a count field of -1 when a file has no ACL
+ * defined, while IRIX's acl_to_text() returns NULL when presented
+ * with such an ACL.
+ *
+ * Checking the count in the acl structure before calling
+ * acl_to_text() lets us avoid error messages about files
+ * with no ACLs, without modifying the flow of the code used for
+ * other operating systems, and it saves making some calls
+ * to acl_to_text() besides.
+ */
+ if (acl->acl_cnt <= 0) {
+ acl_free(acl);
+ return 0;
+ }
+#endif