View | Details | Raw Unified | Return to bug 231072
Collapse All | Expand All

(-)b/contrib/mtree/create.c (-8 / +1 lines)
Lines 84-96 static uid_t uid; Link Here
84
static mode_t mode;
84
static mode_t mode;
85
static u_long flags;
85
static u_long flags;
86
86
87
#ifdef __FreeBSD__
88
#define	FTS_CONST const
89
#else
90
#define	FTS_CONST
91
#endif
92
93
static int	dcmp(const FTSENT *FTS_CONST *, const FTSENT *FTS_CONST *);
94
static void	output(FILE *, int, int *, const char *, ...)
87
static void	output(FILE *, int, int *, const char *, ...)
95
    __printflike(4, 5);
88
    __printflike(4, 5);
96
static int	statd(FILE *, FTS *, FTSENT *, uid_t *, gid_t *, mode_t *,
89
static int	statd(FILE *, FTS *, FTSENT *, uid_t *, gid_t *, mode_t *,
Lines 449-455 statd(FILE *fp, FTS *t, FTSENT *parent, uid_t *puid, gid_t *pgid, mode_t *pmode, Link Here
449
 *
442
 *
450
 * Keep this in sync with nodecmp() in spec.c.
443
 * Keep this in sync with nodecmp() in spec.c.
451
 */
444
 */
452
static int
445
int
453
dcmp(const FTSENT *FTS_CONST *a, const FTSENT *FTS_CONST *b)
446
dcmp(const FTSENT *FTS_CONST *a, const FTSENT *FTS_CONST *b)
454
{
447
{
455
448
(-)b/contrib/mtree/extern.h (+7 lines)
Lines 59-69 enum flavor { Link Here
59
	F_NETBSD6
59
	F_NETBSD6
60
};
60
};
61
61
62
#ifdef __FreeBSD__
63
#define	FTS_CONST const
64
#else
65
#define	FTS_CONST
66
#endif
67
62
void	 addtag(slist_t *, char *);
68
void	 addtag(slist_t *, char *);
63
int	 check_excludes(const char *, const char *);
69
int	 check_excludes(const char *, const char *);
64
int	 compare(NODE *, FTSENT *);
70
int	 compare(NODE *, FTSENT *);
65
int	 crc(int, u_int32_t *, u_int32_t *);
71
int	 crc(int, u_int32_t *, u_int32_t *);
66
void	 cwalk(FILE *);
72
void	 cwalk(FILE *);
73
int	 dcmp(const FTSENT *FTS_CONST *, const FTSENT *FTS_CONST *);
67
void	 dump_nodes(FILE *, const char *, NODE *, int);
74
void	 dump_nodes(FILE *, const char *, NODE *, int);
68
void	 init_excludes(void);
75
void	 init_excludes(void);
69
int	 matchtags(NODE *);
76
int	 matchtags(NODE *);
(-)b/contrib/mtree/verify.c (-1 / +1 lines)
Lines 86-92 vwalk(void) Link Here
86
	argv[0] = dot;
86
	argv[0] = dot;
87
	argv[1] = NULL;
87
	argv[1] = NULL;
88
88
89
	if ((t = fts_open(argv, ftsoptions, NULL)) == NULL)
89
	if ((t = fts_open(argv, ftsoptions, dcmp)) == NULL)
90
		mtree_err("fts_open: %s", strerror(errno));
90
		mtree_err("fts_open: %s", strerror(errno));
91
	level = root;
91
	level = root;
92
	specdepth = rval = 0;
92
	specdepth = rval = 0;

Return to bug 231072