diff options
| author | Rui Paulo <rpaulo@FreeBSD.org> | 2010-09-09 11:10:15 +0000 |
|---|---|---|
| committer | Rui Paulo <rpaulo@FreeBSD.org> | 2010-09-09 11:10:15 +0000 |
| commit | 37c380fbb559d7bc9f0955e801243f4a6347d7ab (patch) | |
| tree | efc59cc0b124b6399d89c7c828eb66b8b0ca9f31 /cddl | |
| parent | d3555b6fc22201a449396be0ca21f6e235721bf6 (diff) | |
Notes
Diffstat (limited to 'cddl')
| -rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c index 0b8899ab8b57..ca355eacdd77 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c @@ -1616,6 +1616,18 @@ dtrace_program_link(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, uint_t dflags, int eprobes = 0, ret = 0; #if !defined(sun) + if (access(file, R_OK) == 0) { + fprintf(stderr, "dtrace: target object (%s) already exists. " + "Please remove the target\ndtrace: object and rebuild all " + "the source objects if you wish to run the DTrace\n" + "dtrace: linking process again\n", file); + /* + * Several build infrastructures run DTrace twice (e.g. + * postgres) and we don't want the build to fail. Return + * 0 here since this isn't really a fatal error. + */ + return (0); + } /* XXX Should get a temp file name here. */ snprintf(tfile, sizeof(tfile), "%s.tmp", file); #endif |
