Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW Compile fix #329

Merged
merged 25 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
53209fc
Added support for mingw64 (gcc 6.3.0)
msbroadf Jun 18, 2017
a5b9beb
Fixed mingw32/64 issue
msbroadf Jun 25, 2017
7ee1669
be more verbose (#312)
weinrank Apr 25, 2019
e6d4743
Improve and of ICMP messages on Windows.
tuexen May 1, 2019
b8e97a7
Fix broken links, Make URLs' protocols consistent (#315)
tillz May 16, 2019
e8e39b5
Backport https://svnweb.freebsd.org/base?view=revision&revision=340783
tuexen May 19, 2019
ab105a0
Improve input validation for the IPPROTO_SCTP level socket options
tuexen May 19, 2019
8ad82a0
Allow sending on demand SCTP HEARTBEATS only in the ESTABLISHED state.
tuexen May 19, 2019
2672aab
Fix cross-build linux->mingw (#320)
orgads Jun 26, 2019
127801c
merged mingw PR with upstream
weinrank Jun 27, 2019
8e6a666
Fix compile error due to merge mistake.
weinrank Jun 27, 2019
bbeb7d4
test commit
weinrank Jun 27, 2019
ab7e628
Add MinGW and MinGW64 support
weinrank Jun 28, 2019
b8a1318
MinGW support, polishing
weinrank Jun 28, 2019
016d685
Merge remote-tracking branch 'upstream/master'
weinrank Jun 28, 2019
7f7c325
Merge branch 'master' into mingw
weinrank Jun 28, 2019
d92bca9
Sanitize non C-style comments
weinrank Jun 28, 2019
967b6f9
Merge branch 'mingw' of https://github.com/weinrank/usrsctp into mingw
weinrank Jun 28, 2019
1ceeca9
Revert uint32_t casting for htonl
weinrank Jun 28, 2019
111e0ca
Ignore wformat errors on GCC + MinGW platforms
weinrank Jun 28, 2019
0f9b957
Merge remote-tracking branch 'upstream/master'
weinrank Jul 26, 2019
40590d7
Merge branch 'master' into mingw
weinrank Jul 26, 2019
c561c0c
Merge remote-tracking branch 'upstream/master' into mingw
weinrank Jul 29, 2019
cc4fd05
Fix compile errors for MinGW
weinrank Jul 29, 2019
a49f277
Addressed Michaels comments and improved verbosity
weinrank Jul 30, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion programs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-D__APPLE_USE_RFC_2292)
endif ()

if (MSYS)
if (MSYS OR MINGW)
message(STATUS "MSYS")
add_definitions(-D__USE_MINGW_ANSI_STDIO)
add_definitions(-DWINVER=0x0601)
add_definitions(-D_WIN32_WINNT=0x0601)

if (CMAKE_C_COMPILER_ID MATCHES "GNU")
message(STATUS "MYSYS + GCC")
Expand Down
2 changes: 2 additions & 0 deletions usrsctplib/netinet/sctp_pcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -6852,7 +6852,9 @@ sctp_pcb_init()
#endif
#if defined(__Userspace__)
mbuf_initialize(NULL);
#if !defined(__MINGW32__)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't insert an ifdef here. Let us call atomic_init() in any case for the userland stack.

Please replace in user_atomic.h

#if defined(__Userspace_os_Windows)
#if !defined(__MINGW32__)
static void atomic_init(void) {} /* empty when we are not using atomic_mtx */
#endif
#else
static inline void atomic_init(void) {} /* empty when we are not using atomic_mtx */
#endif

by

#if defined(__Userspace_os_Windows)
static void atomic_init(void) {} /* empty when we are not using atomic_mtx */
#else
static inline void atomic_init(void) {} /* empty when we are not using atomic_mtx */
#endif

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

atomic_init();
#endif
#if defined(INET) || defined(INET6)
recv_thread_init();
#endif
Expand Down
4 changes: 2 additions & 2 deletions usrsctplib/netinet/sctp_pcb.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ struct sctp_base_info {
#endif
#endif
#ifdef INET
#if defined(__Userspace_os_Windows)
#if defined(__Userspace_os_Windows) && !defined(__MINGW32__)
SOCKET userspace_rawsctp;
SOCKET userspace_udpsctp;
#else
Expand All @@ -331,7 +331,7 @@ struct sctp_base_info {
userland_thread_t recvthreadudp;
#endif
#ifdef INET6
#if defined(__Userspace_os_Windows)
#if defined(__Userspace_os_Windows) && !defined(__MINGW32__)
SOCKET userspace_rawsctp6;
SOCKET userspace_udpsctp6;
#else
Expand Down