Skip to content

Commit 15c7d79

Browse files
authored
Merge pull request #2821 from fedux/build-fixes
build: cmake build fixes for missing symbols checks and pipe2 detection
2 parents bde3f75 + fbdcc77 commit 15c7d79

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ endif()
315315

316316
# Check symbols
317317
check_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
318+
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
318319
check_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
320+
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
319321
check_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
320322

321323
check_symbol_exists(le16toh "${ENDIAN_INCLUDES}" HAVE_DECL_LE16TOH)

src/config/gridcoin-config.h.cmake.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
#cmakedefine HAVE_SYS_ENDIAN_H
3535
#cmakedefine HAVE_SYS_PRCTL_H
3636

37+
#cmakedefine01 HAVE_DECL_FORK
38+
#cmakedefine01 HAVE_DECL_PIPE2
39+
#cmakedefine01 HAVE_DECL_SETSID
40+
3741
#cmakedefine01 HAVE_DECL_LE16TOH
3842
#cmakedefine01 HAVE_DECL_LE32TOH
3943
#cmakedefine01 HAVE_DECL_LE64TOH

0 commit comments

Comments
 (0)