Skip to content

Commit db39c3e

Browse files
nabijaczleweliandrewc12
authored andcommitted
Re-fix -Wwrite-strings on FreeBSD
Follow up fix for a926aab. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13348 Closes openzfs#13610
1 parent 64605c6 commit db39c3e

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/libspl/include/os/freebsd/sys/mnttab.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ extern int _sol_getmntent(FILE *fp, struct mnttab *mp);
7979
extern int getextmntent(const char *path, struct extmnttab *entry,
8080
struct stat64 *statbuf);
8181
extern void statfs2mnttab(struct statfs *sfs, struct mnttab *mp);
82-
extern char *hasmntopt(struct mnttab *mnt, char *opt);
82+
extern char *hasmntopt(struct mnttab *mnt, const char *opt);
8383
extern int getmntent(FILE *fp, struct mnttab *mp);
8484

8585
#endif

lib/libspl/os/freebsd/mnttab.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ mntopt(char **p)
6767
}
6868

6969
char *
70-
hasmntopt(struct mnttab *mnt, char *opt)
70+
hasmntopt(struct mnttab *mnt, const char *opt)
7171
{
7272
char tmpopts[MNT_LINE_MAX];
7373
char *f, *opts = tmpopts;

lib/libzfs/os/freebsd/libzfs_zmount.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ build_iovec(struct iovec **iov, int *iovlen, const char *name, void *val,
7575

7676
static int
7777
do_mount_(const char *spec, const char *dir, int mflag,
78-
char *dataptr, int datalen, char *optptr, int optlen)
78+
char *dataptr, int datalen, const char *optptr, int optlen)
7979
{
8080
struct iovec *iov;
8181
char *optstr, *p, *tofree;

module/os/freebsd/zfs/zfs_acl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *vap, cred_t *cr,
16691669
acl_ids->z_fgid = 0;
16701670
}
16711671
if (acl_ids->z_fgid == 0) {
1672-
char *domain;
1672+
const char *domain;
16731673
uint32_t rid;
16741674

16751675
acl_ids->z_fgid = dzp->z_gid;

0 commit comments

Comments
 (0)