diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-12 13:32:26 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-12 13:32:26 +0000 |
commit | 71d3f07e99601b0f289beee02fd0e542ab3aa6c2 (patch) | |
tree | ef017ed0eecb1e74d43d4404f55a8a8ac3d99328 /lib/libc/gen/fts.c | |
parent | 7e029939dfa8444a46006e5a9d4ee8f115f44891 (diff) |
Wrap <fts.h> and <ftw.h> so that internal calls to fts_*() go direct and
fts_*(), ftw(), and nftw() are weak symbols
Diffstat (limited to 'lib/libc/gen/fts.c')
-rw-r--r-- | lib/libc/gen/fts.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 0aa86572576..88b9bfcd0da 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.c,v 1.50 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: fts.c,v 1.51 2015/09/12 13:32:24 guenther Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -176,6 +176,7 @@ mem2: free(sp->fts_path); mem1: free(sp); return (NULL); } +DEF_WEAK(fts_open); static void fts_load(FTS *sp, FTSENT *p) @@ -243,6 +244,7 @@ fts_close(FTS *sp) return (error); } +DEF_WEAK(fts_close); /* * Special case of "/" at the end of the path so that slashes aren't @@ -440,6 +442,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent); p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; return (sp->fts_cur = p); } +DEF_WEAK(fts_read); /* * Fts_set takes the stream as an argument although it's not used in this @@ -459,6 +462,7 @@ fts_set(FTS *sp, FTSENT *p, int instr) p->fts_instr = instr; return (0); } +DEF_WEAK(fts_set); FTSENT * fts_children(FTS *sp, int instr) @@ -527,6 +531,7 @@ fts_children(FTS *sp, int instr) (void)close(fd); return (sp->fts_child); } +DEF_WEAK(fts_children); /* * This is the tricky part -- do not casually change *anything* in here. The |