hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
mtklein | 1ee7651 | 2015-11-02 10:20:27 -0800 | [diff] [blame] | 7 | #include "SkTypes.h" |
| 8 | #if !defined(SK_BUILD_FOR_WIN32) |
| 9 | |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 10 | #include "SkOSLibrary.h" |
| 11 | |
| 12 | #include <dlfcn.h> |
| 13 | |
| 14 | void* DynamicLoadLibrary(const char* libraryName) { |
Mike Klein | b338484 | 2017-03-27 14:28:07 -0400 | [diff] [blame] | 15 | return dlopen(libraryName, RTLD_LAZY); |
hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 16 | } |
| 17 | |
| 18 | void* GetProcedureAddress(void* library, const char* functionName) { |
| 19 | return dlsym(library, functionName); |
| 20 | } |
mtklein | 1ee7651 | 2015-11-02 10:20:27 -0800 | [diff] [blame] | 21 | #endif//!defined(SK_BUILD_FOR_WIN32) |