git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use linker script to control visibility of symbols.
[libguestfs.git]
/
daemon
/
realpath.c
diff --git
a/daemon/realpath.c
b/daemon/realpath.c
index
17e74ea
..
e6c81ef
100644
(file)
--- a/
daemon/realpath.c
+++ b/
daemon/realpath.c
@@
-27,14
+27,29
@@
#include <sys/types.h>
#include <dirent.h>
#include <sys/types.h>
#include <dirent.h>
-#include "openat.h"
-
#include "daemon.h"
#include "daemon.h"
+#include "optgroups.h"
#include "actions.h"
#include "actions.h"
+/* On Windows, NAME_MAX is not defined. */
+#ifndef NAME_MAX
+#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)
{
char *
do_realpath (const char *path)
{
+#ifdef HAVE_REALPATH
char *ret;
CHROOT_IN;
char *ret;
CHROOT_IN;
@@
-46,6
+61,9
@@
do_realpath (const char *path)
}
return ret; /* caller frees */
}
return ret; /* caller frees */
+#else
+ NOT_AVAILABLE (NULL);
+#endif
}
char *
}
char *