xref: /linux/tools/build/feature/test-libbfd-threadsafe.c (revision c7decec2f2d2ab0366567f9e30c0e1418cece43f)
1 // SPDX-License-Identifier: GPL-2.0
2 #include <bfd.h>
3 
lock(void * unused)4 static bool lock(void *unused)
5 {
6 	return true;
7 }
8 
unlock(void * unused)9 static bool unlock(void *unused)
10 {
11 	return true;
12 }
13 
main(void)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