summaryrefslogtreecommitdiff
path: root/asmrun/spacetime.c
diff options
context:
space:
mode:
Diffstat (limited to 'asmrun/spacetime.c')
-rw-r--r--asmrun/spacetime.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/asmrun/spacetime.c b/asmrun/spacetime.c
index bdcdd9f4f8..5d0d0dede2 100644
--- a/asmrun/spacetime.c
+++ b/asmrun/spacetime.c
@@ -225,14 +225,12 @@ void caml_spacetime_initialize(void)
caml_secure_getenv("OCAML_SPACETIME_SNAPSHOT_DIR");
if (user_specified_automatic_snapshot_dir == NULL) {
-#ifdef HAS_GETCWD
+#if defined(HAS_GETCWD)
if (getcwd(cwd, sizeof(cwd)) == NULL) {
dir_ok = 0;
}
#else
- if (getwd(cwd) == NULL) {
- dir_ok = 0;
- }
+ dir_ok = 0;
#endif
if (dir_ok) {
automatic_snapshot_dir = strdup(cwd);