$NetBSD: patch-af,v 1.3 2011/12/29 20:13:14 mwilhelmy Exp $ --- talk/base/latebindingsymboltable.cc.orig 2011-12-14 15:58:27.000000000 +0000 +++ talk/base/latebindingsymboltable.cc @@ -27,7 +27,7 @@ #include "talk/base/latebindingsymboltable.h" -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) #include #endif @@ -36,7 +36,7 @@ namespace talk_base { inline static const char *GetDllError() { -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) char *err = dlerror(); if (err) { return err; @@ -49,7 +49,7 @@ inline static const char *GetDllError() } DllHandle InternalLoadDll(const char dll_name[]) { -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) DllHandle handle = dlopen(dll_name, RTLD_NOW); #else #error Not implemented @@ -61,7 +61,7 @@ DllHandle InternalLoadDll(const char dll } void InternalUnloadDll(DllHandle handle) { -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) if (dlclose(handle) != 0) { LOG(LS_ERROR) << GetDllError(); } @@ -73,7 +73,7 @@ void InternalUnloadDll(DllHandle handle) static bool LoadSymbol(DllHandle handle, const char *symbol_name, void **symbol) { -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) *symbol = dlsym(handle, symbol_name); char *err = dlerror(); if (err) { @@ -96,7 +96,7 @@ bool InternalLoadSymbols(DllHandle handl int num_symbols, const char *const symbol_names[], void *symbols[]) { -#ifdef LINUX +#if defined(LINUX) || defined(__NetBSD__) // Clear any old errors. dlerror(); #endif