Skip to content

Commit eea3207

Browse files
committed
Fixed Haiku port and dependency checking.
1 parent 4a42148 commit eea3207

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

modules.cmake

100644100755
+13-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
# keep in mind that the check is recursive.
1212

1313
clever_new_module(std.date ON DOC "enable the date module")
14-
clever_new_module(std.concurrent ON DOC "enable the concurrent module")
14+
15+
clever_new_module(std.concurrent ON
16+
DOC "enable the concurrent module"
17+
LIBS PTHREAD)
18+
1519
clever_new_module(std.net ON DOC "enable the net module")
1620
clever_new_module(std.clever ON DOC "enable the clever module")
1721
clever_new_module(std.file ON DOC "enable the file module")
@@ -25,7 +29,7 @@ clever_new_module(std.collection ON DOC "enable the collection module")
2529
clever_new_module(std.getopt ON DOC "enable the getopt module")
2630

2731
clever_new_module(std.regex ON
28-
DOC"enable the regex module"
32+
DOC "enable the regex module"
2933
LIBS PCRECPP)
3034

3135
clever_new_module(std.ffi ON
@@ -58,6 +62,7 @@ clever_new_module(gui.ncurses ON
5862
)
5963

6064
# std.concurrent
65+
clever_module_check(std.concurrent)
6166
if(STD_CONCURRENT AND UNIX)
6267
list(APPEND STD_CONCURRENT_LIB_DEPENDS PTHREAD)
6368
clever_module_check(std.concurrent)
@@ -75,8 +80,12 @@ endif()
7580

7681
# std.net
7782
clever_module_check(std.net)
78-
if(STD_NET AND MSVC)
79-
list(APPEND CLEVER_LIBRARIES ws2_32)
83+
if(STD_NET)
84+
if (MSVC)
85+
list(APPEND CLEVER_LIBRARIES ws2_32)
86+
elseif(HAIKU)
87+
list(APPEND CLEVER_LIBRARIES network)
88+
endif()
8089
endif()
8190

8291

modules/std/net/csocket.h

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <string>
1212
#ifndef _WIN32
1313
#include <sys/socket.h>
14+
#include <sys/select.h>
1415
#include <netdb.h>
1516
#include <netinet/in.h>
1617
#include <arpa/inet.h>

0 commit comments

Comments
 (0)