check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS)
testsuite_uname_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
-testsuite_path_la_CPPFLAGS = $(AM_CPPFLAGS) \
- -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
/* ************************************************************************ */
#define streq(a, b) (strcmp((a), (b)) == 0)
#define strstartswith(a, b) (strncmp(a, b, strlen(b)) == 0)
+#define strnstartswith(a, b, n) (strncmp(a, b, n) == 0)
char *strchr_replace(char *s, char c, char r);
void *memdup(const void *p, size_t n) __attribute__((nonnull(1)));
static inline bool need_trap(const char *path)
{
return path != NULL && path[0] == '/'
- && !strstartswith(path, ABS_TOP_BUILDDIR);
+ && !strnstartswith(path, rootpath, rootpathlen);
}
static const char *trap_path(const char *path, char buf[PATH_MAX * 2])