  				continue;
  			default:
 -				BAD_ERROR("sigtimedwait/sigwaitinfo failed "
-+				BAD_ERROR("sigwaitfailed "
++				BAD_ERROR("sigwait failed "
  					"because %s\n", strerror(errno));
  			}
  		}

 #include <sys/sysinfo.h>
 #include <sys/sysmacros.h>
+#endif
+
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
@@ -2235,6 +2240,7 @@ void initialise_threads(int fragment_buffer_size, int data_buffer_size)
 	sigemptyset(&sigmask);
 	sigaddset(&sigmask, SIGQUIT);
 	sigaddset(&sigmask, SIGHUP);

 #include <errno.h>
 
+#ifndef FNM_EXTMATCH /* glibc extension */
+	#define FNM_EXTMATCH 0
+#endif
+
 #include "squashfs_fs.h"
