diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e925a669bd..0a6f8cb6cc 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index b82c0a936a..e89fc94593 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -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:** diff --git a/iceoryx_platform/win/include/iceoryx_platform/acl.hpp b/iceoryx_platform/win/include/iceoryx_platform/acl.hpp index 6c18ed8010..8d69c5e08a 100644 --- a/iceoryx_platform/win/include/iceoryx_platform/acl.hpp +++ b/iceoryx_platform/win/include/iceoryx_platform/acl.hpp @@ -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; } diff --git a/iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp b/iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp index 87818c6a87..fd0083748f 100644 --- a/iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp +++ b/iceoryx_platform/win/include/iceoryx_platform/mqueue.hpp @@ -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; diff --git a/iceoryx_platform/win/include/iceoryx_platform/socket.hpp b/iceoryx_platform/win/include/iceoryx_platform/socket.hpp index e7a3591436..7352094197 100644 --- a/iceoryx_platform/win/include/iceoryx_platform/socket.hpp +++ b/iceoryx_platform/win/include/iceoryx_platform/socket.hpp @@ -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); diff --git a/iceoryx_platform/win/include/iceoryx_platform/types.hpp b/iceoryx_platform/win/include/iceoryx_platform/types.hpp index 4cd6937c6a..968cb9d7d2 100644 --- a/iceoryx_platform/win/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/win/include/iceoryx_platform/types.hpp @@ -23,8 +23,10 @@ using iox_gid_t = int; using iox_uid_t = int; #if defined(_MSC_VER) using mode_t = int; -using ssize_t = size_t; +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; diff --git a/iceoryx_platform/win/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/win/include/iceoryx_platform/unistd.hpp index c4719fd4cf..9fbe0be81a 100644 --- a/iceoryx_platform/win/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/win/include/iceoryx_platform/unistd.hpp @@ -35,7 +35,6 @@ #endif using iox_off_t = long; -using iox_ssize_t = int; #define IOX_F_OK 0 #define IOX_X_OK 1 @@ -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 diff --git a/iceoryx_platform/win/source/socket.cpp b/iceoryx_platform/win/source/socket.cpp index c0e360d31e..1e07e3ec4e 100644 --- a/iceoryx_platform/win/source/socket.cpp +++ b/iceoryx_platform/win/source/socket.cpp @@ -16,6 +16,7 @@ #include "iceoryx_platform/socket.hpp" #include "iceoryx_platform/logging.hpp" +#include "iceoryx_platform/types.hpp" #include int iox_bind(int sockfd, const struct sockaddr* addr, socklen_t addrlen) @@ -36,14 +37,14 @@ int iox_setsockopt(int sockfd, int level, int optname, const void* optval, sockl return 0; } -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) { IOX_PLATFORM_LOG(IOX_PLATFORM_LOG_LEVEL_ERROR, "'iox_sendto' is not implemented in windows!"); return 0; } -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) { IOX_PLATFORM_LOG(IOX_PLATFORM_LOG_LEVEL_ERROR, "'iox_recvfrom' is not implemented in windows!"); return 0; diff --git a/iceoryx_platform/win/source/unistd.cpp b/iceoryx_platform/win/source/unistd.cpp index 534801fe63..8ac61fdf65 100644 --- a/iceoryx_platform/win/source/unistd.cpp +++ b/iceoryx_platform/win/source/unistd.cpp @@ -20,6 +20,7 @@ #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);