[Git][ghc/ghc][master] rts/linker/Elf.c: add missing <dlfcn.h> include (musl support)

Marge Bot gitlab at gitlab.haskell.org
Thu Dec 10 06:46:40 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
6484f0d7 by Sergei Trofimovich at 2020-12-10T01:46:33-05:00
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 at gentoo.org>

- - - - -


1 changed file:

- rts/linker/Elf.c


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6484f0d72a9110c5960b9185f239e6ce049b0c74

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6484f0d72a9110c5960b9185f239e6ce049b0c74
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201210/7415378f/attachment.html>


More information about the ghc-commits mailing list