From 750c95d62fd348488dfac1def1af48a70a9dc85d Mon Sep 17 00:00:00 2001 From: Alexander Schwinn <alexxcons@xfce.org> Date: Sun, 19 Feb 2023 23:26:54 +0100 Subject: [PATCH] Use realpath only if available on platform (#1030) (cherry picked from commit 339e0ee67e37bf3c8a9a179cc536e02e184b24ab) --- configure.ac.in | 2 +- thunar/thunar-gio-extensions.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac.in b/configure.ac.in index 65c46ba8a..a658fb63c 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -144,7 +144,7 @@ dnl *** Check for standard functions *** dnl ************************************ AC_FUNC_MMAP() AC_CHECK_FUNCS([localeconv mkdtemp pread pwrite sched_yield setgroupent \ - setpassent strcoll strlcpy strptime symlink atexit]) + setpassent strcoll strlcpy strptime symlink atexit realpath]) dnl ****************************** dnl *** Check for i18n support *** diff --git a/thunar/thunar-gio-extensions.c b/thunar/thunar-gio-extensions.c index e7fd5e260..17bd6ff28 100644 --- a/thunar/thunar-gio-extensions.c +++ b/thunar/thunar-gio-extensions.c @@ -33,6 +33,10 @@ #include <stdlib.h> /* realpath */ #endif +#ifndef HAVE_REALPATH +#define realpath(path, resolved_path) NULL +#endif + #include <libxfce4util/libxfce4util.h> #include <thunar/thunar-file.h> -- GitLab