Add some FreeBSD stuff from Stijn Hoop (fritti)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user