Date: Mon, 19 Apr 2010 09:53:55 GMT From: Lucius Windschuh <lwindschuh@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/145829: sysutils/fuser: Re-enable build on 9-CURRENT Message-ID: <201004190953.o3J9rtp8030541@www.freebsd.org> Resent-Message-ID: <201004191000.o3JA0DeP072529@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 145829 >Category: ports >Synopsis: sysutils/fuser: Re-enable build on 9-CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Apr 19 10:00:12 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Lucius Windschuh >Release: 9-CURRENT (i386) >Organization: >Environment: FreeBSD t400 9.0-CURRENT FreeBSD 9.0-CURRENT #139 r206412MP: Fri Apr 9 11:14:32 CEST 2010 root@t400:/usr/obj/usr/src/sys/CURRENT i386 >Description: sysutils/fuser was marked broken on 9-CURRENT because it uses K&R-style prototypes, which lead to warnings with the current build options. The attached patch converts K&R-style to ANSI-style prototypes and clears the BROKEN flag. As a result, this port is usable on 9-CURRENT. >How-To-Repeat: cd /usr/ports/sysutils/fuser && make install clean >Fix: Patch attached with submission follows: diff -Nur sysutils/fuser-old/Makefile sysutils/fuser/Makefile --- sysutils/fuser-old/Makefile 2010-04-18 23:45:05.000000000 +0200 +++ sysutils/fuser/Makefile 2010-04-19 11:38:51.000000000 +0200 @@ -35,7 +35,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra::patch-nfs.c .endif .if ${OSVERSION} >= 900000 -BROKEN= does not build +EXTRA_PATCHES+= ${FILESDIR}/extra::patch-prototypes .endif do-install: diff -Nur sysutils/fuser-old/files/extra::patch-prototypes sysutils/fuser/files/extra::patch-prototypes --- sysutils/fuser-old/files/extra::patch-prototypes 1970-01-01 01:00:00.000000000 +0100 +++ sysutils/fuser/files/extra::patch-prototypes 2010-04-19 11:37:50.000000000 +0200 @@ -0,0 +1,257 @@ +diff -ur devfs.c.orig devfs.c +--- devfs.c.orig 2006-03-14 12:07:08.000000000 +0100 ++++ devfs.c 2010-04-19 11:28:24.000000000 +0200 +@@ -50,9 +50,7 @@ + #include "fuser.h" + + int +-devfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++devfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct devfs_dirent devfs_dirent; + struct mount mount; +diff -ur fuser.c.orig fuser.c +--- fuser.c.orig 2010-04-19 11:22:32.000000000 +0200 ++++ fuser.c 2010-04-19 11:27:07.000000000 +0200 +@@ -249,10 +249,7 @@ + } + + void +-print_file_info(pid, uid, ufl) +- pid_t pid; +- uid_t uid; +- int ufl; ++print_file_info(pid_t pid, uid_t uid, int ufl) + { + uint i; + +@@ -273,8 +270,7 @@ + * Add file to the list. + */ + static int +-addfile(path) +- const char *path; ++addfile(const char *path) + { + struct stat sb; + int type; +@@ -314,9 +310,7 @@ + * by a given process and add suitable entries to list. + */ + static int +-add_ofiles(fd, head) +- const struct filedesc *fd; +- fds_head_t *head; ++add_ofiles(const struct filedesc *fd, fds_head_t *head) + { + struct file **ofiles; + struct file file; +@@ -389,8 +383,7 @@ + * This routine returns controlling tty of the process, if exist. + */ + const vnode_t * +-get_ctty(p) +- const kinfo_proc_t *p; ++get_ctty(const kinfo_proc_t *p) + { + struct proc proc; + struct pgrp pgrp; +@@ -430,8 +423,7 @@ + * given process. The structure's pointer will be inserted in the list. + */ + int +-gather_pinfo(p) +- const kinfo_proc_t *p; ++gather_pinfo(const kinfo_proc_t *p) + { + struct filedesc fd_info; + pinfo_t *pinfo; +@@ -484,10 +476,7 @@ + * Insert finfo structure for given vnode into the list + */ + static int +-vp2finfo(vp, head, ufl) +- const vnode_t *vp; +- fds_head_t *head; +- int ufl; ++vp2finfo(const vnode_t *vp, fds_head_t *head, int ufl) + { + vnode_t vn; + finfo_t *finfo; +@@ -540,9 +529,7 @@ + * informations how given file is used. + */ + static int +-get_uflags(rfile, pinfo) +- const reqfile_t *rfile; +- const pinfo_t *pinfo; ++get_uflags( const reqfile_t *rfile, const pinfo_t *pinfo) + { + finfo_t *fd; + int ufl = 0; +@@ -586,8 +573,7 @@ + * Helper routine to free pinfo structure + */ + static void +-pinfo_free(pinfo) +- pinfo_t *pinfo; ++pinfo_free(pinfo_t *pinfo) + { + + ASSERT(pinfo); +@@ -596,9 +582,7 @@ + } + + int +-main(argc, argv) +- int argc; +- char *argv[]; ++main(int argc, char *argv[]) + { + reqfile_t *rfile; + pinfo_t *pinfo; +@@ -724,8 +708,7 @@ + * associated dev_t. + */ + dev_t +-dev2udev(dev) +- struct cdev *dev; ++dev2udev(struct cdev *dev) + { + struct cdev_priv priv; + int ret; +@@ -740,9 +723,7 @@ + } + + int +-add_mmapped(p, head) +- const kinfo_proc_t *p; +- fds_head_t *head; ++add_mmapped(const kinfo_proc_t *p, fds_head_t *head) + { + vm_map_t map; + struct vmspace vmspace; +@@ -803,8 +784,7 @@ + * Returns signal number for it's string representation + */ + static int +-str2sig(str) +- const char *str; ++str2sig(const char *str) + { + int n; + +diff -ur isofs.c.orig isofs.c +--- isofs.c.orig 2005-08-25 03:19:02.000000000 +0200 ++++ isofs.c 2010-04-19 11:27:52.000000000 +0200 +@@ -55,9 +55,7 @@ + #include "fuser.h" + + int +-isofs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++isofs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct iso_node node; + struct iso_mnt mnt; +diff -ur msdosfs.c.orig msdosfs.c +--- msdosfs.c.orig 2010-04-19 11:22:32.000000000 +0200 ++++ msdosfs.c 2010-04-19 11:27:30.000000000 +0200 +@@ -65,9 +65,7 @@ + #define VTODE(vp) ((struct denode *)(vp)->v_data) + + int +-msdosfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++msdosfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct denode denode; + u_long dirsperblk; +diff -ur nfs.c.orig nfs.c +--- nfs.c.orig 2010-04-19 11:22:32.000000000 +0200 ++++ nfs.c 2010-04-19 11:29:23.000000000 +0200 +@@ -50,9 +50,7 @@ + #include "fuser.h" + + int +-nfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++nfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct nfsnode nfsnode; + int ret; +diff -ur ntfs.c.orig ntfs.c +--- ntfs.c.orig 2005-08-25 03:19:02.000000000 +0200 ++++ ntfs.c 2010-04-19 11:29:41.000000000 +0200 +@@ -42,9 +42,7 @@ + #include "fuser.h" + + int +-ntfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++ntfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct fnode fnod; + struct ntnode node; +diff -ur nwfs.c.orig nwfs.c +--- nwfs.c.orig 2005-08-25 03:19:02.000000000 +0200 ++++ nwfs.c 2010-04-19 11:30:03.000000000 +0200 +@@ -44,9 +44,7 @@ + #include "fuser.h" + + int +-nwfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++nwfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct nwnode node; + struct mount mnt; +diff -ur smbfs.c.orig smbfs.c +--- smbfs.c.orig 2005-08-25 03:27:58.000000000 +0200 ++++ smbfs.c 2010-04-19 11:30:14.000000000 +0200 +@@ -44,9 +44,7 @@ + #include "fuser.h" + + int +-smbfs_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++smbfs_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct smbnode node; + struct mount mnt; +diff -ur udf.c.orig udf.c +--- udf.c.orig 2006-03-14 12:07:08.000000000 +0100 ++++ udf.c 2010-04-19 11:30:27.000000000 +0200 +@@ -75,9 +75,7 @@ + #define VTON(vp) ((struct udf_node *)((vp)->v_data)) + + int +-udf_filestat(vp, fsp) +- const vnode_t *vp; +- finfo_t *fsp; ++udf_filestat(const vnode_t *vp, finfo_t *fsp) + { + struct udf_node node; + struct udf_mnt mnt; +diff -ur ufs.c.orig ufs.c +--- ufs.c.orig 2005-08-24 16:05:29.000000000 +0200 ++++ ufs.c 2010-04-19 11:28:54.000000000 +0200 +@@ -50,9 +50,7 @@ + #include "fuser.h" + + int +-ufs_filestat(vp, finfo) +- const vnode_t *vp; +- finfo_t *finfo; ++ufs_filestat(const vnode_t *vp, finfo_t *finfo) + { + struct inode inode; + int ret; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004190953.o3J9rtp8030541>