summaryrefslogtreecommitdiffhomepage
path: root/src/os-unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/os-unix.h')
-rw-r--r--src/os-unix.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os-unix.h b/src/os-unix.h
index 8b7bf27..5c3c604 100644
--- a/src/os-unix.h
+++ b/src/os-unix.h
@@ -45,6 +45,7 @@ typedef char os_char;
#define os_dlsym dlsym
+#ifdef __linux__
static inline bool os_dlfile(void *m, char *buf, int sz) {
// NOTE: this might be linux/glibc-specific (I haven't checked every
// implementation). this is fine as we don't use it in any build-time code,
@@ -54,6 +55,7 @@ static inline bool os_dlfile(void *m, char *buf, int sz) {
if (ssz > sz) { errno = ENAMETOOLONG; return false; }
memcpy(buf, lm->l_name, ssz); return true;
}
+#endif
// unix mprot flags are much nicer but cannot be defined in terms of the windows
// ones, so we use the windows ones and define them in terms of the unix ones.