$OpenBSD: patch-function_c,v 1.1 2012/03/22 20:23:40 robert Exp $

Fix Savannah bug #35919: realpath(3) does not fail on !linux if
the given path does not exist

--- function.c.orig	Tue Mar 20 21:04:24 2012
+++ function.c	Tue Mar 20 21:05:51 2012
@@ -2008,9 +2008,7 @@ func_realpath (char *o, char **argv, const char *funcn
   const char *path = 0;
   int doneany = 0;
   unsigned int len = 0;
-#ifndef HAVE_REALPATH
   struct stat st;
-#endif
   PATH_VAR (in);
   PATH_VAR (out);
 
@@ -2025,9 +2023,9 @@ func_realpath (char *o, char **argv, const char *funcn
 #ifdef HAVE_REALPATH
               realpath (in, out)
 #else
-              abspath (in, out) && stat (out, &st) == 0
+              abspath (in, out)
 #endif
-             )
+             && stat (out, &st) == 0)
             {
               o = variable_buffer_output (o, out, strlen (out));
               o = variable_buffer_output (o, " ", 1);
