File tree Expand file tree Collapse file tree 3 files changed +26
-17
lines changed Expand file tree Collapse file tree 3 files changed +26
-17
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,7 @@ libbitcoin_util_a_SOURCES = \
472
472
support/lockedpool.cpp \
473
473
chainparamsbase.cpp \
474
474
clientversion.cpp \
475
+ compat/glibc_sanity_fdelt.cpp \
475
476
compat/glibc_sanity.cpp \
476
477
compat/glibcxx_sanity.cpp \
477
478
compat/strnlen.cpp \
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2009-2018 The Bitcoin Core developers
1
+ // Copyright (c) 2009-2019 The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
9
9
#include < cstddef>
10
10
11
11
#if defined(HAVE_SYS_SELECT_H)
12
- # include < sys/select.h >
12
+ bool sanity_test_fdelt ();
13
13
#endif
14
14
15
15
extern " C" void * memcpy (void * a, const void * b, size_t c);
@@ -41,21 +41,6 @@ bool sanity_test_memcpy()
41
41
}
42
42
return true ;
43
43
}
44
-
45
- #if defined(HAVE_SYS_SELECT_H)
46
- // trigger: Call FD_SET to trigger __fdelt_chk. FORTIFY_SOURCE must be defined
47
- // as >0 and optimizations must be set to at least -O2.
48
- // test: Add a file descriptor to an empty fd_set. Verify that it has been
49
- // correctly added.
50
- bool sanity_test_fdelt ()
51
- {
52
- fd_set fds;
53
- FD_ZERO (&fds);
54
- FD_SET (0 , &fds);
55
- return FD_ISSET (0 , &fds);
56
- }
57
- #endif
58
-
59
44
} // namespace
60
45
61
46
bool glibc_sanity_test ()
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2009-2019 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ #if defined(HAVE_CONFIG_H)
6
+ #include < config/bitcoin-config.h>
7
+ #endif
8
+
9
+ #if defined(HAVE_SYS_SELECT_H)
10
+ #include < sys/select.h>
11
+
12
+ // trigger: Call FD_SET to trigger __fdelt_chk. FORTIFY_SOURCE must be defined
13
+ // as >0 and optimizations must be set to at least -O2.
14
+ // test: Add a file descriptor to an empty fd_set. Verify that it has been
15
+ // correctly added.
16
+ bool sanity_test_fdelt ()
17
+ {
18
+ fd_set fds;
19
+ FD_ZERO (&fds);
20
+ FD_SET (0 , &fds);
21
+ return FD_ISSET (0 , &fds);
22
+ }
23
+ #endif
You can’t perform that action at this time.
0 commit comments