From 8ac435caf03bd91f4f73e62e57bcc9a2f31eaf4c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 4 May 2018 06:17:15 -0700 Subject: bugfix: correcly obtain self path on Solaris. * configure: Add detection for getexecname. * sysif.c (getcwd_wrap): Change static function to external. * sysif.h (getcwd_wrap): Declared. * txr.c (get_self_path): New implementation for Solaris using getexecname, which requires us to prepend the current directory name if the result is a relative path. --- sysif.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sysif.h') diff --git a/sysif.h b/sysif.h index a9c13cd5..bae55147 100644 --- a/sysif.h +++ b/sysif.h @@ -69,4 +69,7 @@ INLINE void repress_privilege(void) { } INLINE void drop_privilege(void) { } INLINE void simulate_setuid_setgid(val open_script) { } #endif +#if HAVE_UNISTD_H +val getcwd_wrap(void); +#endif void sysif_init(void); -- cgit v1.2.3