test-libbfd-threadsafe.c 299 B

123456789101112131415161718
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include <bfd.h>
  3. static bool lock(void *unused)
  4. {
  5. return true;
  6. }
  7. static bool unlock(void *unused)
  8. {
  9. return true;
  10. }
  11. int main(void)
  12. {
  13. /* Check for presence of new thread safety API (version 2.42) */
  14. return !bfd_thread_init(lock, unlock, NULL);
  15. }