[Mesa-dev] [PATCH] util/build_id: Include <dlfcn.h>

Chad Versace chadversary at chromium.org
Wed Sep 13 19:23:57 UTC 2017


Fix the build for Android Nougat.

The dladdr(3) manpage says that <dlfcn.h> is required. On Linux, the
build succeeded without it because build_id.c includes <link.h> which
includes <dlfcn.h>. On Android, we must include <dlfcn.h> directly.

Fixes: 5c98d382 "util: Query build-id by symbol address, not library name"
Cc: Matt Turner <mattst88 at gmail.com>
---
 src/util/build_id.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/build_id.c b/src/util/build_id.c
index 6280b4a54e..536c74360e 100644
--- a/src/util/build_id.c
+++ b/src/util/build_id.c
@@ -22,6 +22,7 @@
  */
 
 #ifdef HAVE_DL_ITERATE_PHDR
+#include <dlfcn.h>
 #include <link.h>
 #include <stddef.h>
 #include <string.h>
-- 
2.13.0



More information about the mesa-dev mailing list