Skip to content

Commit

Permalink
this commit (perhaps) gets rid of a windows warning
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Jul 30, 2024
1 parent 44d8099 commit eaaf818
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -36003,7 +36003,11 @@ SFUNC void fio___pubsub_broadcast_on_port(void *port_) {
FIO_SOCK_TCP | FIO_SOCK_NONBLOCK | FIO_SOCK_SERVER);
FIO_ASSERT(fd_tcp != -1, "couldn't open cluster-peer listening socket!");
{
#if FIO_OS_WIN
char enabled = 1;
#else
int enabled = 1;
#endif
setsockopt(fd_udp, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled));
enabled = 1;
setsockopt(fd_udp, SOL_SOCKET, SO_REUSEADDR, &enabled, sizeof(enabled));
Expand Down
4 changes: 4 additions & 0 deletions fio-stl/420 pubsub.h
Original file line number Diff line number Diff line change
Expand Up @@ -2201,7 +2201,11 @@ SFUNC void fio___pubsub_broadcast_on_port(void *port_) {
FIO_SOCK_TCP | FIO_SOCK_NONBLOCK | FIO_SOCK_SERVER);
FIO_ASSERT(fd_tcp != -1, "couldn't open cluster-peer listening socket!");
{
#if FIO_OS_WIN
char enabled = 1;
#else
int enabled = 1;
#endif
setsockopt(fd_udp, SOL_SOCKET, SO_BROADCAST, &enabled, sizeof(enabled));
enabled = 1;
setsockopt(fd_udp, SOL_SOCKET, SO_REUSEADDR, &enabled, sizeof(enabled));
Expand Down

0 comments on commit eaaf818

Please sign in to comment.