mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-26 05:40:49 +00:00
fix linker error on win32 without network support
by adding missing #ifdefs
This commit is contained in:
parent
a1affca2ca
commit
e4ab5067f1
1 changed files with 6 additions and 2 deletions
|
@ -1330,9 +1330,10 @@ fluid_istream_gets(fluid_istream_t in, char *buf, int len)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef NETWORK_SUPPORT
|
||||||
n = recv(in & ~FLUID_SOCKET_FLAG, &c, 1, 0);
|
n = recv(in & ~FLUID_SOCKET_FLAG, &c, 1, 0);
|
||||||
|
|
||||||
if(n == SOCKET_ERROR)
|
if(n == SOCKET_ERROR)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -1405,10 +1406,13 @@ fluid_ostream_printf(fluid_ostream_t out, const char *format, ...)
|
||||||
return write(out, buf, FLUID_STRLEN(buf));
|
return write(out, buf, FLUID_STRLEN(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef NETWORK_SUPPORT
|
||||||
/* Socket */
|
/* Socket */
|
||||||
retval = send(out & ~FLUID_SOCKET_FLAG, buf, FLUID_STRLEN(buf), 0);
|
retval = send(out & ~FLUID_SOCKET_FLAG, buf, FLUID_STRLEN(buf), 0);
|
||||||
|
|
||||||
return retval != SOCKET_ERROR ? retval : -1;
|
return retval != SOCKET_ERROR ? retval : -1;
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue