Add some FreeBSD stuff from Stijn Hoop (fritti)

This commit is contained in:
theoddone33
2001-05-03 18:17:23 +00:00
parent c433ffb84f
commit c75fddfba3
3 changed files with 12 additions and 0 deletions

View File

@@ -16,6 +16,9 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include <stdio.h>
#ifdef __FreeBSD__
#include <sys/types.h>
#endif
#include <sys/mman.h>
#include <limits.h>
#include <unistd.h>

View File

@@ -365,6 +365,11 @@ DWORD ZFileFindFirst()
*(char *)(DTALocPos + 0x15) = 0;
#ifdef __FreeBSD__
if (globbuf.gl_matchc == 0)
return -1;
#endif
stat ( globbuf.gl_pathv[globcur], &filetype );
if(ZFileFindATTRIB&0x10 && !S_ISDIR ( filetype.st_mode )) return(ZFileFindNext());

View File

@@ -92,8 +92,12 @@
#include <netdb.h>
#include <unistd.h>
#include <sys/ioctl.h>
#ifndef __FreeBSD__
#include <asm/ioctls.h> // for FIONREAD
#else
#include <sys/filio.h> // for FIONREAD
#endif
#else
#include <windows.h>
#include <winsock.h>
#endif