summaryrefslogtreecommitdiff
path: root/NetWare/nw5.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetWare/nw5.c')
-rw-r--r--NetWare/nw5.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/NetWare/nw5.c b/NetWare/nw5.c
index 5fe6ad3b16..fa57c6ea79 100644
--- a/NetWare/nw5.c
+++ b/NetWare/nw5.c
@@ -104,8 +104,22 @@ nw_setbuf(FILE *pf, char *buf)
int
nw_setmode(FILE *fp, int mode)
{
+/**
+ // Commented since a few abends were happening in fnFpSetMode
int *dummy = 0;
return(fnFpSetMode(fp, mode, dummy));
+**/
+
+ int handle = -1;
+ errno = 0;
+
+ handle = fileno(fp);
+ if (errno)
+ {
+ errno = 0;
+ return -1;
+ }
+ return setmode(handle, mode);
}
int