Index: src/include/platform.h
===================================================================
--- src/include/platform.h	(revision 3240)
+++ src/include/platform.h	(working copy)
@@ -169,6 +169,9 @@
 
 #ifdef OSX
  #define socklen_t unsigned int
+ #define stat64 stat
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
 #endif
 
 #if !HAVE_ATOLL
Index: src/applications/vpn/Makefile.am
===================================================================
--- src/applications/vpn/Makefile.am	(revision 3240)
+++ src/applications/vpn/Makefile.am	(working copy)
@@ -1,3 +1,4 @@
+if MACOSX
 INCLUDES = -I$(top_srcdir)/src/include
 
 plugindir = $(libdir)/GNUnet
@@ -20,4 +21,5 @@
 libgnunetmodule_vpn_la_LDFLAGS = \
   -export-dynamic -avoid-version -module \
   $(LDADD)
+endif
 
Index: configure.ac
===================================================================
--- configure.ac	(revision 3240)
+++ configure.ac	(working copy)
@@ -72,6 +72,8 @@
      AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
      CFLAGS="-no-cpp-precomp $CFLAGS"
      LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS"
+	 AC_MSG_WARN([The VPN application cannot be compiled on your OS])
+	 buildtarget="macosx"
      ;;
 linux*)
      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
@@ -127,6 +129,7 @@
 esac
 
 AC_MSG_CHECKING([for build target])
+AM_CONDITIONAL(MACOSX,  test "$build_target" = "macosx")
 AM_CONDITIONAL(CYGWIN,  test "$build_target" = "cygwin")
 AM_CONDITIONAL(MINGW,   test "$build_target" = "mingw")
 AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
