rem: result->direntBuffer = uio_malloc( sizeof (struct dirent) - ((sizeof (((struct dirent *) 0)->d_name) + 3) & 3) + (((NAME_MAX + 1) + 3) & 3));
add: bufferSize = sizeof (struct dirent) - sizeof (((struct dirent *) 0)->d_name) + (NAME_MAX + 1);
context: stdio_EntriesIterator_new(DIR *dirHandle) {	stdio_EntriesIterator *result;	result = stdio_EntriesIterator_alloc();	result->dirHandle = dirHandle;	// Linux's and FreeBSD's struct dirent are defined with a 	// maximum d_name field (NAME_MAX).	// However, POSIX doesn't require this, and in fact	// at least QNX defines struct dirent with an empty d_name field.	// This should take care of it:	result->direntBuffer = uio_malloc(			sizeof (struct dirent)			- ((sizeof (((struct dirent *) 0)->d_name) + 3) & 3)			+ (((NAME_MAX + 1) + 3) & 3));			// Take the length of the dirent structure as it is defined,			// subtract the length of the d_name field, and add the length			// of the maximum length d_name field (NAME_MAX plus 1 for			// the '\0').			// The '(... +3) & 3' is to take into account that fields			// will be aligned on 4 bytes.			// (What about 64 bits machines?)	return result;}