From e705014394ababd24edfb5e1eb052876e3cb5510 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Tue, 7 May 2019 22:57:50 -0700 Subject: [PATCH] binfile: ignore vdso bytes if not on Linux Of course, this all needs improvements to be realistically useful, but it allows us to get things at least opening. We can adjust how we store that data to make it available on other OS's later. --- src/libsysprof/binfile.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libsysprof/binfile.c b/src/libsysprof/binfile.c index a8761797..04430fcc 100644 --- a/src/libsysprof/binfile.c +++ b/src/libsysprof/binfile.c @@ -300,6 +300,7 @@ get_lines (const char *format, static const uint8_t * get_vdso_bytes (size_t *length) { +#ifdef __linux__ static const uint8_t *bytes = NULL; static size_t n_bytes = 0; static gboolean has_data; @@ -343,6 +344,11 @@ get_vdso_bytes (size_t *length) *length = n_bytes; return bytes; +#else + if (length) + *length = 0; + return NULL; +#endif } bin_file_t *