comparison UnitTestsSources/PluginsTests.cpp @ 2364:ae50eccd41b7

compilation succeeds on OpenBSD
author jodogne
date Mon, 21 Aug 2017 16:28:53 +0200
parents a3a65de1840f
children 878b59270859
comparison
equal deleted inserted replaced
2363:f8ef157f2d73 2364:ae50eccd41b7
63 ASSERT_THROW(l.GetFunction("world"), OrthancException); 63 ASSERT_THROW(l.GetFunction("world"), OrthancException);
64 ASSERT_TRUE(l.GetFunction("dlopen") != NULL); 64 ASSERT_TRUE(l.GetFunction("dlopen") != NULL);
65 ASSERT_TRUE(l.HasFunction("dlclose")); 65 ASSERT_TRUE(l.HasFunction("dlclose"));
66 ASSERT_FALSE(l.HasFunction("world")); 66 ASSERT_FALSE(l.HasFunction("world"));
67 67
68 #elif defined(__FreeBSD__) 68 #elif defined(__FreeBSD__) || defined(__OpenBSD__)
69 // dlopen() in FreeBSD is supplied by libc, libc.so is 69 // dlopen() in FreeBSD/OpenBSD is supplied by libc, libc.so is
70 // a ldscript, so we can't actually use it. Use thread 70 // a ldscript, so we can't actually use it. Use thread
71 // library instead - if it works - dlopen() is good. 71 // library instead - if it works - dlopen() is good.
72 SharedLibrary l("libpthread.so"); 72 SharedLibrary l("libpthread.so");
73 ASSERT_THROW(l.GetFunction("world"), OrthancException); 73 ASSERT_THROW(l.GetFunction("world"), OrthancException);
74 ASSERT_TRUE(l.GetFunction("pthread_create") != NULL); 74 ASSERT_TRUE(l.GetFunction("pthread_create") != NULL);