summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-12-09 18:02:06 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-12-10 01:46:33 -0500
commit6484f0d72a9110c5960b9185f239e6ce049b0c74 (patch)
treeedc41afdb59888f5d063219a1dc0ac9f83d6d8db
parent3551c554acd8d692de7948c47a27327988b3a308 (diff)
downloadhaskell-6484f0d72a9110c5960b9185f239e6ce049b0c74.tar.gz
rts/linker/Elf.c: add missing <dlfcn.h> include (musl support)
The change fixes build failure on musl: ``` rts/linker/Elf.c:2031:3: error: warning: implicit declaration of function 'dlclose'; did you mean 'close'? [-Wimplicit-function-declaration] 2031 | dlclose(nc->dlopen_handle); | ^~~~~~~ | close ``` Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rw-r--r--rts/linker/Elf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 92bf43abd4..a9c8a2fd8a 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -32,6 +32,9 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#if defined(HAVE_DLFCN_H)
+#include <dlfcn.h>
+#endif
#if defined(HAVE_SYS_STAT_H)
#include <sys/stat.h>
#endif