This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.
Stuart Henderson stu at spacehopper.orgOn 2013/04/20 19:45, Alan Corey wrote: > >> I forgot to mention it, but rtl_sdr (the simplest one) also doesn't > >> work. I was looking at trying to adapt them to use the Gnu pth > >> threads. > > > > I think Pth won't help things on OpenBSD versions which already use > > kernel threads (5.2+), and unlikely to have helped earlier versions > > with userland threads either, the problem with userland thread > > implementations is how file descriptor blocking is handled. > > I was trying to figure out whether pth was abandoned or just mature > enough that it doesn't need any more updates. Looks like it's just > mature. I was suspicious that it was somebody's thesis project. It's not all that much needed now that most unix-like OS have posix threads support.. > Your patch/diff for the cmake stuff works fine under OpenBSD, but not > under Linux: bleh, silly mistake ;) OK - just setup an fc18 box to test it; here's a fixed version. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4b91a4b..4cc77fc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -101,12 +101,17 @@ target_link_libraries(rtl_adsb rtlsdr_shared if(UNIX) target_link_libraries(rtl_fm m) target_link_libraries(rtl_adsb m) -if(APPLE) - target_link_libraries(rtl_test m) -else() - target_link_libraries(rtl_test m rt) -endif() -endif() + +include(CheckFunctionExists) +check_function_exists(clock_gettime LIBRT_LIBC_HAS_CLOCK_GETTIME) +if(LIBRT_LIBC_HAS_CLOCK_GETTIME) + set(LIBRT_LIBRARIES) +else(LIBRT_LIBC_HAS_CLOCK_GETTIME) + find_library(LIBRT_LIBRARIES NAMES rt) +endif(LIBRT_LIBC_HAS_CLOCK_GETTIME) + +target_link_libraries(rtl_test m ${LIBRT_LIBRARIES}) +endif(UNIX) if(WIN32) target_link_libraries(rtl_sdr libgetopt_static)