diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2017-11-06 16:06:36 -0800 |
---|---|---|
committer | jsorg71 <jay.sorg@gmail.com> | 2017-11-07 18:20:45 -0800 |
commit | 26507644e38906dee9095de29c92d0170c6da92f (patch) | |
tree | 9253309324433dc08ce71c928456e1de2aa5cd16 /common/os_calls.c | |
parent | 50bd624cc49d7409f6f73b65aeae4cabdec3e7ee (diff) | |
download | xrdp-proprietary-26507644e38906dee9095de29c92d0170c6da92f.tar.gz xrdp-proprietary-26507644e38906dee9095de29c92d0170c6da92f.zip |
vsock, move some defines
Diffstat (limited to 'common/os_calls.c')
-rw-r--r-- | common/os_calls.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index fb55376a..7bd3e68f 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -586,17 +586,15 @@ g_sck_local_socket(void) } /*****************************************************************************/ -#if defined(XRDP_ENABLE_VSOCK) int g_sck_vsock_socket(void) { -#if defined(_WIN32) - return 0; -#else +#if defined(XRDP_ENABLE_VSOCK) return socket(PF_VSOCK, SOCK_STREAM, 0); +#else + return 0; #endif } -#endif /*****************************************************************************/ /* returns error */ @@ -1007,13 +1005,10 @@ g_sck_local_bind(int sck, const char *port) } /*****************************************************************************/ -#if defined(XRDP_ENABLE_VSOCK) int g_sck_vsock_bind(int sck, const char *port) { -#if defined(_WIN32) - return -1; -#else +#if defined(XRDP_ENABLE_VSOCK) struct sockaddr_vm s; memset(&s, 0, sizeof(struct sockaddr_vm)); @@ -1022,9 +1017,10 @@ g_sck_vsock_bind(int sck, const char *port) s.svm_cid = VMADDR_CID_ANY; return bind(sck, (struct sockaddr *)&s, sizeof(struct sockaddr_vm)); +#else + return -1; #endif } -#endif #if defined(XRDP_ENABLE_IPV6) /*****************************************************************************/ |