19 #include <sys/utsname.h> 
   32 #if (defined(__GNUC__) || defined(__clang__)) && !defined(__MINGW32__) && !defined(__MINGW64__) 
   33 #define KVIKIO_EXPORT __attribute__((visibility("default")))
 
   34 #define KVIKIO_HIDDEN __attribute__((visibility("hidden")))
 
   40 #define KVIKIO_STRINGIFY_DETAIL(x) #x 
   41 #define KVIKIO_STRINGIFY(x)        KVIKIO_STRINGIFY_DETAIL(x) 
   49 void* 
load_library(std::string 
const& name, 
int mode = RTLD_LAZY | RTLD_LOCAL | RTLD_NODELETE);
 
   60 void get_symbol(T& handle, 
void* lib, std::string 
const& name)
 
   64   handle          = 
reinterpret_cast<T
>(::dlsym(lib, name.c_str()));
 
   65   char const* err = ::dlerror();
 
   66   if (err != 
nullptr) { 
throw std::runtime_error(err); }
 
bool run_udev_readable() noexcept
Check if /run/udev is readable.
 
void * load_library(std::string const &name, int mode=RTLD_LAZY|RTLD_LOCAL|RTLD_NODELETE)
Load shared library.
 
void get_symbol(T &handle, void *lib, std::string const &name)
Get symbol using dlsym
 
bool is_running_in_wsl() noexcept
Try to detect if running in Windows Subsystem for Linux (WSL)