1*c18e2b64SPatrick Venture /*
2*c18e2b64SPatrick Venture * Copyright 2018 Google Inc.
3*c18e2b64SPatrick Venture *
4*c18e2b64SPatrick Venture * Licensed under the Apache License, Version 2.0 (the "License");
5*c18e2b64SPatrick Venture * you may not use this file except in compliance with the License.
6*c18e2b64SPatrick Venture * You may obtain a copy of the License at
7*c18e2b64SPatrick Venture *
8*c18e2b64SPatrick Venture * http://www.apache.org/licenses/LICENSE-2.0
9*c18e2b64SPatrick Venture *
10*c18e2b64SPatrick Venture * Unless required by applicable law or agreed to in writing, software
11*c18e2b64SPatrick Venture * distributed under the License is distributed on an "AS IS" BASIS,
12*c18e2b64SPatrick Venture * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*c18e2b64SPatrick Venture * See the License for the specific language governing permissions and
14*c18e2b64SPatrick Venture * limitations under the License.
15*c18e2b64SPatrick Venture */
16*c18e2b64SPatrick Venture
17*c18e2b64SPatrick Venture #include "sys.hpp"
18*c18e2b64SPatrick Venture
19*c18e2b64SPatrick Venture #include <dlfcn.h>
20*c18e2b64SPatrick Venture
21*c18e2b64SPatrick Venture namespace blobs
22*c18e2b64SPatrick Venture {
23*c18e2b64SPatrick Venture
24*c18e2b64SPatrick Venture namespace internal
25*c18e2b64SPatrick Venture {
26*c18e2b64SPatrick Venture
dlerror() const27*c18e2b64SPatrick Venture const char* DlSysImpl::dlerror() const
28*c18e2b64SPatrick Venture {
29*c18e2b64SPatrick Venture return ::dlerror();
30*c18e2b64SPatrick Venture }
31*c18e2b64SPatrick Venture
dlopen(const char * filename,int flags) const32*c18e2b64SPatrick Venture void* DlSysImpl::dlopen(const char* filename, int flags) const
33*c18e2b64SPatrick Venture {
34*c18e2b64SPatrick Venture return ::dlopen(filename, flags);
35*c18e2b64SPatrick Venture }
36*c18e2b64SPatrick Venture
dlsym(void * handle,const char * symbol) const37*c18e2b64SPatrick Venture void* DlSysImpl::dlsym(void* handle, const char* symbol) const
38*c18e2b64SPatrick Venture {
39*c18e2b64SPatrick Venture return ::dlsym(handle, symbol);
40*c18e2b64SPatrick Venture }
41*c18e2b64SPatrick Venture
42*c18e2b64SPatrick Venture DlSysImpl dlsys_impl;
43*c18e2b64SPatrick Venture
44*c18e2b64SPatrick Venture } // namespace internal
45*c18e2b64SPatrick Venture } // namespace blobs
46