LibC: Make dlfcn stubs extern "C" like the outside world expects.

This commit is contained in:
Andreas Kling 2019-05-28 14:30:55 +02:00
parent ab9db3a717
commit 631894279b
Notes: sideshowbarker 2024-07-19 13:52:17 +09:00
2 changed files with 11 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#include "dlfcn.h"
#include <assert.h>
#include <dlfcn.h>
extern "C" {
int dlclose(void*)
{
@ -20,3 +22,5 @@ void *dlsym(void*, const char*)
{
ASSERT_NOT_REACHED();
}
}

View File

@ -1,5 +1,9 @@
#pragma once
#include <sys/cdefs.h>
__BEGIN_DECLS
#define RTLD_LAZY 1
#define RTLD_NOW 2
#define RTLD_GLOBAL 3
@ -9,3 +13,5 @@ int dlclose(void*);
char *dlerror();
void *dlopen(const char*, int);
void *dlsym(void*, const char*);
__END_DECLS