Skip to content

Commit

Permalink
win: fixed windows build
Browse files Browse the repository at this point in the history
- added stub for missing uio.h file
- updated windows configurations to add new files

Signed-off-by: Oblomov, Sergey <sergey.oblomov@intel.com>
  • Loading branch information
Oblomov, Sergey committed Nov 23, 2016
1 parent 13aa0e4 commit 3608f66
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
8 changes: 2 additions & 6 deletions include/windows/osd.h
Expand Up @@ -24,6 +24,8 @@
#include <errno.h>
#include "pthread.h"

#include <sys/uio.h>

#include <rdma/fi_errno.h>
#include <rdma/fabric.h>

Expand Down Expand Up @@ -157,12 +159,6 @@ static inline char* strsep(char **stringp, const char *delim)
return ptr;
}

struct iovec
{
void *iov_base; /* Pointer to data. */
size_t iov_len; /* Length of data. */
};

#define __attribute__(x)

static inline int ofi_memalign(void **memptr, size_t alignment, size_t size)
Expand Down
26 changes: 26 additions & 0 deletions include/windows/sys/uio.h
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2016 Intel Corporation. All rights reserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

#ifndef _FI_WIN_SYS_UIO_H_
#define _FI_WIN_SYS_UIO_H_

#include <inttypes.h>
#include <stdint.h>

struct iovec {
void *iov_base; /* Pointer to data. */
size_t iov_len; /* Length of data. */
};

#endif /* _FI_WIN_SYS_UIO_H_ */

2 changes: 2 additions & 0 deletions libfabric.vcxproj
Expand Up @@ -104,6 +104,7 @@
<ForcedIncludeFiles Condition="'$(Configuration)|$(Platform)'=='Release|x64'">fi_osd.h</ForcedIncludeFiles>
</ClCompile>
<ClCompile Include="prov\rxd\src\rxd_rma.c" />
<ClCompile Include="prov\rxm\src\rxm.c" />
<ClCompile Include="prov\rxm\src\rxm_attr.c" />
<ClCompile Include="prov\rxm\src\rxm_conn.c" />
<ClCompile Include="prov\rxm\src\rxm_cq.c" />
Expand Down Expand Up @@ -232,6 +233,7 @@
<ClCompile Include="src\fasthash.c" />
<ClCompile Include="src\fi_tostr.c" />
<ClCompile Include="src\indexer.c" />
<ClCompile Include="src\iov.c" />
<ClCompile Include="src\log.c" />
<ClCompile Include="src\rbtree.c" />
<ClCompile Include="src\var.c" />
Expand Down
6 changes: 6 additions & 0 deletions libfabric.vcxproj.filters
Expand Up @@ -276,6 +276,12 @@
<ClCompile Include="prov\rxm\src\rxm_init.c">
<Filter>Source Files\prov\rxm\src</Filter>
</ClCompile>
<ClCompile Include="src\iov.c">
<Filter>Source Files\src</Filter>
</ClCompile>
<ClCompile Include="prov\rxm\src\rxm.c">
<Filter>Source Files\prov\rxm\src</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\fasthash.h">
Expand Down

0 comments on commit 3608f66

Please sign in to comment.