diff options
author | John Emmas <john@creativepost.co.uk> | 2020-03-26 10:40:36 +0000 |
---|---|---|
committer | John Emmas <john@creativepost.co.uk> | 2020-03-26 10:40:36 +0000 |
commit | 4dd3d4effe6c76e97d2e0a915257570999b14574 (patch) | |
tree | daefcb1a868235abb29e7c172773ac2cddbe9bea /libs/pbd | |
parent | d7500056fc60d65753b473528f6f6a32d51ba19f (diff) |
Some initial changes (currently for libpbd only) to help a new contributer who's trying to build with MSVC2017
These changes compile okay for me (using VS2019) although they wouldn't link to my older-built libraries. Hopefully he'll be okay if he builds everything with the same compiler.
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/crossthread.win.cc | 4 | ||||
-rw-r--r-- | libs/pbd/pbd/windows_mmcss.h | 2 | ||||
-rw-r--r-- | libs/pbd/timing.cc | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/libs/pbd/crossthread.win.cc b/libs/pbd/crossthread.win.cc index 51f9a89e9d..1d0758c911 100644 --- a/libs/pbd/crossthread.win.cc +++ b/libs/pbd/crossthread.win.cc @@ -32,7 +32,7 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking) send_address.sin_family = AF_INET; send_address.sin_addr.s_addr = inet_addr("127.0.0.1"); send_address.sin_port = htons(0); - int status = bind(send_socket, (SOCKADDR*)&send_address, + int status = ::bind(send_socket, (SOCKADDR*)&send_address, sizeof(send_address)); if (status != 0) { @@ -54,7 +54,7 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking) recv_address.sin_family = AF_INET; recv_address.sin_addr.s_addr = inet_addr("127.0.0.1"); recv_address.sin_port = htons(0); - status = bind(receive_socket, (SOCKADDR*)&recv_address, + status = ::bind(receive_socket, (SOCKADDR*)&recv_address, sizeof(recv_address)); if (status != 0) { diff --git a/libs/pbd/pbd/windows_mmcss.h b/libs/pbd/pbd/windows_mmcss.h index 43628509e2..6c61edfbe6 100644 --- a/libs/pbd/pbd/windows_mmcss.h +++ b/libs/pbd/pbd/windows_mmcss.h @@ -38,10 +38,12 @@ enum AVRT_PRIORITY { AVRT_PRIORITY_CRITICAL }; +#ifndef ERROR_INVALID_TASK_NAME enum error_codes { ERROR_INVALID_TASK_NAME = 1550, ERROR_INVALID_TASK_INDEX = 1551 }; +#endif bool LIBPBD_API initialize (); diff --git a/libs/pbd/timing.cc b/libs/pbd/timing.cc index 4a88622b9b..44b0701807 100644 --- a/libs/pbd/timing.cc +++ b/libs/pbd/timing.cc @@ -21,6 +21,7 @@ #include <sstream> #include <limits> +#include <algorithm> namespace PBD { |