mirror of
https://github.com/bitcoin/bitcoin
synced 2025-10-06 02:32:46 +02:00
Merge bitcoin/bitcoin#32460: fs: remove _POSIX_C_SOURCE
defining
24e5fd3bed
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-ACK24e5fd3bed
, only rebased since my recent [review](https://github.com/bitcoin/bitcoin/pull/32460#pullrequestreview-2854183748). Tree-SHA512: 920d60058821992193616e0c73c2f7e4230a9e3ccb9d71d16493ae69696c868f4325d3dd2d4e8388749080c187aa7b205493b3e2c6986ad37440e591ebe107e1
This commit is contained in:
@@ -55,13 +55,6 @@ check_cxx_source_compiles("
|
||||
|
||||
# Check for posix_fallocate().
|
||||
check_cxx_source_compiles("
|
||||
// same as in src/util/fs_helpers.cpp
|
||||
#ifdef __linux__
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#endif // __linux__
|
||||
#include <fcntl.h>
|
||||
|
||||
int main()
|
||||
|
@@ -22,17 +22,6 @@
|
||||
#include <utility>
|
||||
|
||||
#ifndef WIN32
|
||||
// for posix_fallocate, in cmake/introspection.cmake we check if it is present after this
|
||||
#ifdef __linux__
|
||||
|
||||
#ifdef _POSIX_C_SOURCE
|
||||
#undef _POSIX_C_SOURCE
|
||||
#endif
|
||||
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
|
||||
#endif // __linux__
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
Reference in New Issue
Block a user