summaryrefslogtreecommitdiffstats
path: root/g10/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/test.c')
-rw-r--r--g10/test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/test.c b/g10/test.c
index 734458af3..375f361a7 100644
--- a/g10/test.c
+++ b/g10/test.c
@@ -154,12 +154,12 @@ prepend_srcdir (const char *fname)
static const char *srcdir;
char *result;
- if (!srcdir && !(srcdir = getenv ("srcdir")))
+ if (!srcdir && !(srcdir = getenv ("abs_top_srcdir")))
srcdir = ".";
- result = malloc (strlen (srcdir) + 1 + strlen (fname) + 1);
+ result = malloc (strlen (srcdir) + strlen ("/g10/") + strlen (fname) + 1);
strcpy (result, srcdir);
- strcat (result, "/");
+ strcat (result, "/g10/");
strcat (result, fname);
return result;
}