mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 12:34:27 +00:00
Make raw sockets compile on windows
This commit is contained in:
parent
43bcccf868
commit
68196588c9
@ -188,7 +188,8 @@ scrypt="no"
|
||||
if test "$found_opencl" = 1; then
|
||||
if test "x$adl" != xno; then
|
||||
ADL_CPPFLAGS=
|
||||
AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,)
|
||||
#AC_CHECK_FILE([$srcdir/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$srcdir], have_adl=false,)
|
||||
have_adl=true
|
||||
if test x$have_adl+$have_cgminer_sdk = xfalse+true; then
|
||||
AC_CHECK_FILE([$CGMINER_SDK/include/ADL_SDK/adl_sdk.h], [have_adl=true; ADL_CPPFLAGS=-I$CGMINER_SDK/include], have_adl=false,)
|
||||
fi
|
||||
|
6
miner.h
6
miner.h
@ -14,8 +14,10 @@
|
||||
#include "logging.h"
|
||||
#include "util.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
#ifndef WIN32
|
||||
# include <sys/socket.h>
|
||||
# include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
#ifdef __APPLE_CC__
|
||||
|
2
util.c
2
util.c
@ -206,7 +206,7 @@ static void keep_sockalive(SOCKETTYPE fd)
|
||||
const int keepalive = 1;
|
||||
const int tcp_keepcnt = 1;
|
||||
|
||||
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(keepalive));
|
||||
setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (const void *)&keepalive, sizeof(keepalive));
|
||||
# ifdef __linux
|
||||
setsockopt(fd, SOL_TCP, TCP_KEEPCNT, &tcp_keepcnt, sizeof(tcp_keepcnt));
|
||||
setsockopt(fd, SOL_TCP, TCP_KEEPIDLE, &tcp_keepidle, sizeof(tcp_keepidle));
|
||||
|
Loading…
x
Reference in New Issue
Block a user