--- nut-2.5.91/tools/crurom/crurom.c	2002-08-08 17:23:19.000000000 +0200
+++ nut/tools/crurom/crurom.c	2002-11-06 00:12:09.000000000 +0100
@@ -14,11 +14,21 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
+
 #ifdef _WIN32
-#include <io.h>
-#include "dirent.h"
+ #include <io.h>
+ #include "dirent.h"
+ #define INPUT_FILE_FLAGS (O_RDONLY | O_BINARY)
 #else
-#include <dirent.h>
+ #include <dirent.h>
+ /*those functions have different names in glibc:*/
+ #define strnicmp strncasecmp
+ #define stricmp strcasecmp
+ 
+ /*open() is alwas binary mode */
+ #define INPUT_FILE_FLAGS (O_RDONLY) 
+ /*not quite clean, but works. shoot me ;)*/
+ #define stdout 1
 #endif
 
 #include "getopt.h"
@@ -47,7 +57,8 @@
     if(strnicmp(fsname, rootdir, rootlen) == 0)
         fsname += rootlen;
         
-    if((fd = open(name, O_RDONLY | O_BINARY)) == -1) {
+    
+	if((fd = open(name, INPUT_FILE_FLAGS )) == -1) {
         fprintf(stderr, IDENT ": Error %d opening %s\n", errno, name);
         return -1;
     }
