X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=dlwrap.c;h=aac06f6eda22a663643bd49a0397a4700862a993;hb=c063b28a99d7ee825bcc84e00737469049592169;hp=4bdb12c392ae6587cccd144d1996f306e96652a7;hpb=44b4f7ecdfb8c538aa7616d2ea718f7465446388;p=fips diff --git a/dlwrap.c b/dlwrap.c index 4bdb12c..aac06f6 100644 --- a/dlwrap.c +++ b/dlwrap.c @@ -23,16 +23,10 @@ #define _GNU_SOURCE #include -#include -#include - -#include +#include "fips.h" #include "dlwrap.h" -#define STRNCMP_LITERAL(var, literal) \ - strncmp ((var), (literal), sizeof (literal) - 1) - void *libfips_handle; typedef void * (* fips_dlopen_t)(const char * filename, int flag); @@ -68,7 +62,7 @@ dlopen (const char *filename, int flag) void * dlwrap_real_dlopen (const char *filename, int flag) { - fips_dlopen_t real_dlopen = NULL; + static fips_dlopen_t real_dlopen = NULL; if (! real_dlopen) { real_dlopen = (fips_dlopen_t) dlwrap_real_dlsym (RTLD_NEXT, "dlopen"); @@ -114,7 +108,6 @@ dlsym (void *handle, const char *name) return dlwrap_real_dlsym (handle, name); } -extern void *__dlsym (void *handle, const char *name); void * dlwrap_real_dlsym (void *handle, const char *name) {