From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Oct 10 22:50:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 691ECD97 for ; Thu, 10 Oct 2013 22:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47E2224F4 for ; Thu, 10 Oct 2013 22:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9AMo24J092965 for ; Thu, 10 Oct 2013 22:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9AMo2LS092964; Thu, 10 Oct 2013 22:50:02 GMT (envelope-from gnats) Resent-Date: Thu, 10 Oct 2013 22:50:02 GMT Resent-Message-Id: <201310102250.r9AMo2LS092964@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan `Sec` Zehl Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B538E817 for ; Thu, 10 Oct 2013 22:40:55 +0000 (UTC) (envelope-from sec@42.org) Received: from ice.42.org (v6.42.org [IPv6:2001:608:9::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBEE2477 for ; Thu, 10 Oct 2013 22:40:55 +0000 (UTC) Received: by ice.42.org (Postfix, from userid 1000) id 3B62628422; Fri, 11 Oct 2013 00:40:47 +0200 (CEST) Message-Id: <20131010224047.3B62628422@ice.42.org> Date: Fri, 11 Oct 2013 00:40:47 +0200 (CEST) From: Stefan `Sec` Zehl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/182888: pkg-fallout / clang fix of port misc/sls X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Stefan `Sec` Zehl List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2013 22:50:02 -0000 >Number: 182888 >Category: ports >Synopsis: pkg-fallout / clang fix of port misc/sls >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Thu Oct 10 22:50:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Stefan `Sec` Zehl >Release: FreeBSD 8.4-STABLE amd64 >Organization: >Environment: System: FreeBSD ice 8.4-STABLE FreeBSD 8.4-STABLE #23 r252204: Tue Jun 25 14:30:35 CEST 2013 root@ice:/usr/obj/usr/src/sys/ICE amd64 >Description: misc/sls does not compile with clang. Most of the problem is K&R-style C code without function declarations. >How-To-Repeat: >Fix: attached are two patches - first a "minimal" patch to get it compiling again, the second patch is to get it warning-free on both gcc and clang. I suggest adding both patches, but only the first is striclty necessary. File: misc/sls/files/patch-clang --- sls.c.org 1989-08-20 02:54:57.000000000 +0200 +++ sls.c 2013-10-11 00:17:06.000000000 +0200 @@ -90,6 +90,8 @@ extern int errno; extern time_t time(); +void dirread (char *dirname); +void dofile (register char *fname, int cmdarg); /******************************************************************************/ main (ac, av) @@ -211,6 +213,7 @@ /******************************************************************************/ +void dofile (fname, cmdarg) register char *fname; /* name of file to stat and list */ int cmdarg; /* =1 if fname was command line arg */ @@ -267,6 +270,7 @@ /******************************************************************************/ +void dirread (dirname) char *dirname; { /* read a directory and everything under it that's on the same device */ ====================================================================== File: misc/sls/files/patch-cleanup --- sls.c.orig 2013-10-11 00:30:50.000000000 +0200 +++ sls.c 2013-10-11 00:32:35.000000000 +0200 @@ -24,7 +24,10 @@ #include #include #include -#include +#include +#include +#include +#include #define ISEXEC(m) (m & (S_IEXEC|(S_IEXEC>>3)|(S_IEXEC>>6))) #define MAXUIDS 200 /* max #of user names from passwd file */ @@ -86,14 +89,14 @@ static int sortsfile(), sortfile(); static time_t getsixmosago(); /* for emulating 'ls' date silliness */ -extern char *getenv(), *malloc(), *realloc(); -extern int errno; -extern time_t time(); - void dirread (char *dirname); void dofile (register char *fname, int cmdarg); +void selectfs (register char *fname, register struct stat *psbuf); +void selectf (register char *fname); +void display (SFILESTAT *pf); /******************************************************************************/ +int main (ac, av) int ac; char *av[]; @@ -275,7 +278,7 @@ char *dirname; { /* read a directory and everything under it that's on the same device */ register DIR *dirp; /* ptr to directory list */ - register struct direct *dentp; /* ptr to directory entry */ + register struct dirent *dentp; /* ptr to directory entry */ register char *pfname; register int len; char fname[512]; /* maximum pathname length */ @@ -318,6 +321,7 @@ /******************************************************************************/ +void selectf (fname) register char *fname; { /* allocate space for this file name for sorting */ @@ -360,6 +364,7 @@ /******************************************************************************/ +void selectfs (fname, psbuf) register char *fname; register struct stat *psbuf; @@ -598,6 +603,7 @@ /******************************************************************************/ +void display (pf) SFILESTAT *pf; { /* display info about a file */ >Release-Note: >Audit-Trail: >Unformatted: