]> git.cworth.org Git - fips/blobdiff - dlwrap.h
Add explicit link to libpthread, to work around debugging issues
[fips] / dlwrap.h
index 9b6b53d8d062cf36c71512159272ff0b07e926e0..6460dfef136b0370ba78eb45f9d47f8a19974fed 100644 (file)
--- a/dlwrap.h
+++ b/dlwrap.h
@@ -22,6 +22,9 @@
 #ifndef DLWRAP_H
 #define DLWRAP_H
 
+#define _GNU_SOURCE
+#include <dlfcn.h>
+
 /* Call the *real* dlopen. We have our own wrapper for dlopen that, of
  * necessity must use claim the symbol 'dlopen'. So whenever anything
  * internal needs to call the real, underlying dlopen function, the
 void *
 dlwrap_real_dlopen (const char *filename, int flag);
 
+/* Perform a dlopen on the libfips library itself.
+ *
+ * Many places in fips need to lookup symbols within the libfips
+ * library itself, (and not in any other library). This function
+ * provides a reliable way to get a handle for performing such
+ * lookups.
+ *
+ * The returned handle can be passed to dlwrap_real_dlsym for the
+ * lookups. */
+void *
+dlwrap_dlopen_libfips (void);
+
 /* Call the *real* dlsym. We have our own wrapper for dlsym that, of
  * necessity must use claim the symbol 'dlsym'. So whenever anything
  * internal needs to call the real, underlying dlysm function, the