Skip to content

Commit 053bda5

Browse files
committed
Merge bitcoin#32460: fs: remove _POSIX_C_SOURCE defining
24e5fd3 fs: remove _POSIX_C_SOURCE defining (fanquake) Pull request description: On Linux systems, `_POSIX_C_SOURCE` will default to `200809L` (since glibc 2.10). There's currently no reason for us to undefine it, and then set it to an earlier value. Also tested with musl libc. I think if anything, the project should be settings macros like `_POSIX_C_SOURCE`, globally. ACKs for top commit: hebasto: re-ACK 24e5fd3, only rebased since my recent [review](bitcoin#32460 (review)). Tree-SHA512: 920d60058821992193616e0c73c2f7e4230a9e3ccb9d71d16493ae69696c868f4325d3dd2d4e8388749080c187aa7b205493b3e2c6986ad37440e591ebe107e1
2 parents 9393aee + 24e5fd3 commit 053bda5

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

cmake/introspection.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ check_cxx_source_compiles("
5555

5656
# Check for posix_fallocate().
5757
check_cxx_source_compiles("
58-
// same as in src/util/fs_helpers.cpp
59-
#ifdef __linux__
60-
#ifdef _POSIX_C_SOURCE
61-
#undef _POSIX_C_SOURCE
62-
#endif
63-
#define _POSIX_C_SOURCE 200112L
64-
#endif // __linux__
6558
#include <fcntl.h>
6659
6760
int main()

src/util/fs_helpers.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,6 @@
2222
#include <utility>
2323

2424
#ifndef WIN32
25-
// for posix_fallocate, in cmake/introspection.cmake we check if it is present after this
26-
#ifdef __linux__
27-
28-
#ifdef _POSIX_C_SOURCE
29-
#undef _POSIX_C_SOURCE
30-
#endif
31-
32-
#define _POSIX_C_SOURCE 200112L
33-
34-
#endif // __linux__
35-
3625
#include <fcntl.h>
3726
#include <sys/resource.h>
3827
#include <unistd.h>

0 commit comments

Comments
 (0)