X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Frealpath.c;h=e6c81efbe40ab9bb0fcee810a73fa577c59d8bf1;hb=9ff1c97f04e8c0e513262893df71da0d31b34637;hp=f9d08dac8d6e35a6f409b69b3b92d991c83405c1;hpb=e94f89f40d989d111882178c87b5bfc22314fca8;p=libguestfs.git diff --git a/daemon/realpath.c b/daemon/realpath.c index f9d08da..e6c81ef 100644 --- a/daemon/realpath.c +++ b/daemon/realpath.c @@ -28,6 +28,7 @@ #include #include "daemon.h" +#include "optgroups.h" #include "actions.h" /* On Windows, NAME_MAX is not defined. */ @@ -35,9 +36,20 @@ #define NAME_MAX FILENAME_MAX #endif +int +optgroup_realpath_available (void) +{ +#ifdef HAVE_REALPATH + return 1; +#else + return 0; +#endif +} + char * do_realpath (const char *path) { +#ifdef HAVE_REALPATH char *ret; CHROOT_IN; @@ -49,6 +61,9 @@ do_realpath (const char *path) } return ret; /* caller frees */ +#else + NOT_AVAILABLE (NULL); +#endif } char *