fix non-windows java-net.cpp build

This commit is contained in:
Joel Dice 2010-07-02 09:36:55 -06:00
parent 47d9039b69
commit 5e7e539c2a

View File

@ -13,12 +13,14 @@
#ifdef PLATFORM_WINDOWS
# include <winsock2.h>
# define ONLY_ON_WINDOWS(x) x
#else
# include <netdb.h>
# define ONLY_ON_WINDOWS(x)
#endif
extern "C" JNIEXPORT void JNICALL
Java_java_net_Socket_init(JNIEnv* e, jclass)
Java_java_net_Socket_init(JNIEnv* ONLY_ON_WINDOWS(e), jclass)
{
#ifdef PLATFORM_WINDOWS
static bool wsaInitialized = false;