Commit e4475738fefe3b0c7388b293e8b0828560c6b830

Guillem Jover 2017-01-20T02:20:12

Try <linux/a.out.h> if <a.out.h> is not present At least musl ships the former but not the latter.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/include/bsd/nlist.h b/include/bsd/nlist.h
index 2730237..8531f7a 100644
--- a/include/bsd/nlist.h
+++ b/include/bsd/nlist.h
@@ -28,7 +28,12 @@
 #define LIBBSD_NLIST_H
 
 #include <sys/cdefs.h>
+
+#if __has_include(<a.out.h>)
 #include <a.out.h>
+#elif __has_include(<linux/a.out.h>)
+#include <linux/a.out.h>
+#endif
 
 __BEGIN_DECLS
 extern int nlist(const char *filename, struct nlist *list);