From 852c112a3f6fe4211c5818c2584a1514f46b7d0b Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 2 Feb 2021 22:10:02 +0900 Subject: [PATCH] merge revision(s) 739f929: NetBSD build update. (#4079) --- addr2line.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- addr2line.c | 8 ++++++-- version.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/addr2line.c b/addr2line.c index dc4364aaf5..9669427d36 100644 --- a/addr2line.c +++ b/addr2line.c @@ -2101,11 +2101,15 @@ fail: * and returns strlen(binary_filename). * it is NUL terminated. */ -#if defined(__linux__) +#if defined(__linux__) || defined(__NetBSD__) static ssize_t main_exe_path(void) { -# define PROC_SELF_EXE "/proc/self/exe" +# if defined(__linux__) +# define PROC_SELF_EXE "/proc/self/exe" +# elif defined(__NetBSD__) +# define PROC_SELF_EXE "/proc/curproc/exe" +# endif ssize_t len = readlink(PROC_SELF_EXE, binary_filename, PATH_MAX); if (len < 0) return 0; binary_filename[len] = 0; diff --git a/version.h b/version.h index 92d387bb1d..e8dfcf6999 100644 --- a/version.h +++ b/version.h @@ -12,7 +12,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 32 +#define RUBY_PATCHLEVEL 33 #define RUBY_RELEASE_YEAR 2021 #define RUBY_RELEASE_MONTH 2