Skip to content

Commit fce9858

Browse files
authored
Merge pull request Tencent#35 from zagnix/master
fix compile for centos
2 parents ca8fe05 + f579f9c commit fce9858

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ set_target_properties(colib_shared PROPERTIES VERSION ${LIBCO_VERSION} SOVERSION
4141
# Macro for add example target
4242
macro(add_example_target EXAMPLE_TARGET)
4343
add_executable("example_${EXAMPLE_TARGET}" "example_${EXAMPLE_TARGET}.cpp")
44-
target_link_libraries("example_${EXAMPLE_TARGET}" colib_static)
44+
target_link_libraries("example_${EXAMPLE_TARGET}" colib_static pthread dl)
4545
endmacro(add_example_target)
4646

4747
add_example_target(closure)

example_echosvr.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <arpa/inet.h>
3434
#include <unistd.h>
3535
#include <errno.h>
36+
#include <sys/wait.h>
3637

3738
using namespace std;
3839
struct task_t

0 commit comments

Comments
 (0)