Windows マシンで D プロジェクトをビルドしようとしています。Macで動作しますが、Windowsでビルドするときに次のエラーが発生します.プロジェクト内でコマンド「ダブ」を使用し、ある時点でこれを取得します:
C:\Users\USER\AppData\Local\dub\packages\tinyredis-2.1.1\tinyredis\source\tinyredis\connection.d(145,30): Error: undefined identifier `EWOULDBLOCK`
dmd failed with exit code 1.
この EWOULDBLOCK 変数が Windows で認識されない理由はありますか?
この識別子が表示される connection.d の部分は次のとおりです。
private :
void receive(TcpSocket conn, ref byte[] buffer)
{
byte[1024 * 16] buff;
size_t len = conn.receive(buff);
if (conn.blocking)
{
if(len == 0)
throw new ConnectionException("Server closed the connection!");
else if(len == TcpSocket.ERROR)
throw new ConnectionException("A socket error occurred!");
}
else
{
if (len == -1)
{
import core.stdc.errno;
if (errno == EWOULDBLOCK)
{
len = 0;
errno = 0;
}
else
throw new ConnectionException(format("A socket error occurred! errno: %s", errno));
}
}
buffer ~= buff[0 .. len];
debug(tinyredis) { writeln("Response : ", "'" ~ escape(cast(string)buffer) ~ "'", " Length : ", len); }
}