From da182c01c7580c33c4de47b27b224afdf5e5fff6 Mon Sep 17 00:00:00 2001 From: Tushar Gohad Date: Sun, 29 Jun 2014 13:01:55 -0700 Subject: [PATCH] autoconf: dlfcn.h is required for dlopen, dlsym etc Signed-off-by: Tushar Gohad --- configure.ac | 2 +- include/erasurecode_stdinc.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 800ca94..012df1a 100644 --- a/configure.ac +++ b/configure.ac @@ -64,7 +64,7 @@ dnl Check for C library headers AC_HEADER_STDC AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h - stdint.h ctype.h math.h iconv.h signal.h) + stdint.h ctype.h math.h iconv.h signal.h dlfcn.h) AC_CHECK_FUNCS(malloc calloc realloc free) # C sources diff --git a/include/erasurecode_stdinc.h b/include/erasurecode_stdinc.h index 007abc5..eb6d15e 100644 --- a/include/erasurecode_stdinc.h +++ b/include/erasurecode_stdinc.h @@ -70,6 +70,9 @@ #if defined(HAVE_ICONV) && defined(HAVE_ICONV_H) # include #endif +#ifdef HAVE_DLFCN_H +# include +#endif #if defined(__GNUC__) && __GNUC__ >= 4 # define DECLSPEC __attribute__ ((visibility("default")))