Skip to content

Commit

Permalink
iox-#2209 Fix include and change ssize_t to iox_ssize_t
Browse files Browse the repository at this point in the history
  • Loading branch information
khromenokroman committed Aug 30, 2024
1 parent 959ad3b commit 8b05151
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,17 @@ jobs:
needs: pre-flight-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Unix (FreeBSD) test
id: Test
uses: vmactions/freebsd-vm@v1
with:
release: "14.0"
copyback: false
prepare: pkg install -y cmake git ncurses bash wget bison
run: |
git config --global --add safe.directory /home/runner/work/iceoryx/iceoryx
./tools/ci/build-test-freebsd.sh
- uses: actions/checkout@v4
- name: Unix (FreeBSD) test
id: Test
uses: vmactions/freebsd-vm@v1
with:
release: "14.0"
copyback: false
prepare: pkg install -y cmake git ncurses bash wget bison
run: |
git config --global --add safe.directory /home/runner/work/iceoryx/iceoryx
./tools/ci/build-test-freebsd.sh
run-integration-test:
# prevent stuck jobs consuming runners for 6 hours
Expand Down
2 changes: 1 addition & 1 deletion doc/website/release-notes/iceoryx-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
- 'iox::string' tests can exceed the translation unit compilation timeout [#2278](https://github.com/eclipse-iceoryx/iceoryx/issues/2278)
- Building iceoryx with bazel on Windows is broken [#2320](https://github.com/eclipse-iceoryx/iceoryx/issues/2320)
- Fix wrong memory orders in SpscSoFi [#2177](https://github.com/eclipse-iceoryx/iceoryx/issues/2177)
-
- ssize_t: redefinition; different basic types [#2209](https://github.com/eclipse-iceoryx/iceoryx/issues/2209)

**Refactoring:**

Expand Down
2 changes: 1 addition & 1 deletion iceoryx_platform/win/include/iceoryx_platform/acl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ inline int acl_add_perm(acl_permset_t permset_d, acl_perm_t perm)
return 0;
}

inline char* acl_to_text(acl_t acl, ssize_t* len_p)
inline char* acl_to_text(acl_t acl, iox_ssize_t* len_p)
{
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ inline int mq_close(mqd_t mqdes)
//{
//}

inline ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, unsigned int* msg_prio)
inline iox_ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, unsigned int* msg_prio)
{
return 0;
}

inline ssize_t
inline iox_ssize_t
mq_timedreceive(mqd_t mqdes, char* msg_ptr, size_t msg_len, unsigned int* msg_prio, const struct timespec* abs_timeout)
{
return 0;
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_platform/win/include/iceoryx_platform/socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ using sa_family_t = int;
int iox_bind(int sockfd, const struct sockaddr* addr, socklen_t addrlen);
int iox_socket(int domain, int type, int protocol);
int iox_setsockopt(int sockfd, int level, int optname, const void* optval, socklen_t optlen);
ssize_t
iox_ssize_t
iox_sendto(int sockfd, const void* buf, size_t len, int flags, const struct sockaddr* dest_addr, socklen_t addrlen);
ssize_t iox_recvfrom(int sockfd, void* buf, size_t len, int flags, struct sockaddr* src_addr, socklen_t* addrlen);
iox_ssize_t iox_recvfrom(int sockfd, void* buf, size_t len, int flags, struct sockaddr* src_addr, socklen_t* addrlen);
int iox_connect(int sockfd, const struct sockaddr* addr, socklen_t addrlen);
int iox_closesocket(int sockfd);

Expand Down
2 changes: 2 additions & 0 deletions iceoryx_platform/win/include/iceoryx_platform/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ using iox_uid_t = int;
using mode_t = int;
using iox_ssize_t = int;
using pid_t = int;
#elif defined(__MINGW32__) || defined(__MINGW64__)
using iox_ssize_t = ssize_t;
#endif
using nlink_t = int;
using blksize_t = int;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_platform/win/include/iceoryx_platform/unistd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "iceoryx_platform/types.hpp"
#include "iceoryx_platform/windows.hpp"
#include "types.hpp"

#include <io.h>
#include <process.h>
Expand Down Expand Up @@ -55,4 +54,5 @@ iox_ssize_t iox_write(int fd, const void* buf, size_t count);
iox_gid_t iox_getgid(void);
iox_uid_t iox_geteuid(void);


#endif // IOX_HOOFS_WIN_PLATFORM_UNISTD_HPP
3 changes: 2 additions & 1 deletion iceoryx_platform/win/source/unistd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
//
// SPDX-License-Identifier: Apache-2.0

#include "iceoryx_platform/types.hppt"
#include "iceoryx_platform/unistd.hpp"
#include "iceoryx_platform/handle_translator.hpp"
#include "iceoryx_platform/mman.hpp"
#include "iceoryx_platform/win32_errorHandling.hpp"


int iox_ftruncate(int fildes, off_t length)
{
internal_iox_shm_set_size(fildes, length);
Expand Down

0 comments on commit 8b05151

Please sign in to comment.