now compiles on FreeBSD

pull/1/head
dscho 23 years ago
parent 7c10483c86
commit 9e5110faf7

@ -4,7 +4,7 @@ CFLAGS=-g -Wall
RANLIB=ranlib RANLIB=ranlib
INCLUDES=-I. -Iinclude INCLUDES=-I. -Iinclude
VNCSERVERLIB=-L. -lvncserver -lz -ljpeg VNCSERVERLIB=-L. -lvncserver -L/usr/local/lib -lz -ljpeg
# These two lines enable useage of PThreads # These two lines enable useage of PThreads
#CFLAGS += -DHAVE_PTHREADS #CFLAGS += -DHAVE_PTHREADS

@ -22,6 +22,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
#ifdef __IRIX__ #ifdef __IRIX__
#include <netdb.h> #include <netdb.h>

20
rfb.h

@ -49,14 +49,21 @@ int max(int,int);
#include <zlib.h> #include <zlib.h>
#include <rfbproto.h> #include <rfbproto.h>
#include <netinet/in.h>
#ifdef HAVE_PTHREADS #ifdef HAVE_PTHREADS
#include <pthread.h> #include <pthread.h>
#define IF_PTHREADS(x) (x)
#else
#define IF_PTHREADS(x)
#endif #endif
#ifdef __linux__ #ifdef __linux__
#include <endian.h> #include <endian.h>
#else #else
#ifdef __APPLE__ #if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/types.h>
#include <machine/endian.h> #include <machine/endian.h>
#define _BYTE_ORDER BYTE_ORDER #define _BYTE_ORDER BYTE_ORDER
#define _LITTLE_ENDIAN LITTLE_ENDIAN #define _LITTLE_ENDIAN LITTLE_ENDIAN
@ -73,14 +80,9 @@ int max(int,int);
#define _LITTLE_ENDIAN __LITTLE_ENDIAN #define _LITTLE_ENDIAN __LITTLE_ENDIAN
#endif #endif
#define MAX_ENCODINGS 10 #include <netinet/in.h>
#ifdef HAVE_PTHREADS
#define IF_PTHREADS(x) (x)
#else
#define IF_PTHREADS(x)
#endif
#define MAX_ENCODINGS 10
struct rfbClientRec; struct rfbClientRec;
struct rfbScreenInfo; struct rfbScreenInfo;

Loading…
Cancel
Save