xref: /linux/tools/build/feature/test-libbfd-threadsafe.c (revision bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <bfd.h>
3 
4 static bool lock(void *unused)
5 {
6 	return true;
7 }
8 
9 static bool unlock(void *unused)
10 {
11 	return true;
12 }
13 
14 int main(void)
15 {
16        /* Check for presence of new thread safety API (version 2.42) */
17        return !bfd_thread_init(lock, unlock, NULL);
18 }
19