Fix for issue1594
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c
index 272fe8d..bef7f88 100644
--- a/Mac/Modules/MacOS.c
+++ b/Mac/Modules/MacOS.c
@@ -30,6 +30,9 @@
 #include <Carbon/Carbon.h>
 #include <ApplicationServices/ApplicationServices.h>
 
+#include <arpa/inet.h>  /* for ntohl, htonl */
+
+
 #ifndef HAVE_OSX105_SDK
 typedef SInt16	FSIORefNum;
 #endif
@@ -310,6 +313,10 @@
 		if ((err = FSpGetFInfo(&fss, &info)) != noErr) {
 			return PyErr_Mac(MacOS_Error, err);
 		}
+
+		info.fdCreator = ntohl(info.fdCreator);
+		info.fdType = ntohl(info.fdType);
+
 		creator = PyString_FromStringAndSize(
 				(char *)&info.fdCreator, 4);
 		type = PyString_FromStringAndSize((char *)&info.fdType, 4);
@@ -341,6 +348,8 @@
 
 	} 
 	finfo = (FileInfo*)&(cataloginfo.finderInfo);
+	finfo->fileCreator = ntohl(finfo->fileCreator);
+	finfo->fileType = ntohl(finfo->fileType);
 	creator = PyString_FromStringAndSize((char*)&(finfo->fileCreator), 4);
 	type = PyString_FromStringAndSize((char*)&(finfo->fileType), 4);