From owner-freebsd-current@freebsd.org Fri Dec 28 09:41:03 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA90B1432C71 for ; Fri, 28 Dec 2018 09:41:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 236058291A for ; Fri, 28 Dec 2018 09:41:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id wBS9eot7074494 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 28 Dec 2018 11:40:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua wBS9eot7074494 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id wBS9eoGX074493; Fri, 28 Dec 2018 11:40:50 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 28 Dec 2018 11:40:50 +0200 From: Konstantin Belousov To: Gary Jennejohn Cc: freebsd-current@freebsd.org Subject: Re: HEAD buildworld fails in libc Message-ID: <20181228094050.GG53138@kib.kiev.ua> References: <20181228101812.42000b6d@ernst.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181228101812.42000b6d@ernst.home> User-Agent: Mutt/1.11.1 (2018-12-01) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2018 09:41:04 -0000 On Fri, Dec 28, 2018 at 10:18:12AM +0100, Gary Jennejohn wrote: > I don't know why this hasn't already been reported, but I've been > seeing this error since the commit was made. > > ===> lib/libc (obj,all,install) > /usr/src/lib/libc/string/strerror.c:96:11: error: passing 'const char []' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] > __uprefix, > ^~~~~~~~~ > /usr/src/lib/libc/string/strerror.c:61:23: note: passing argument to parameter 'uprefix' here > errstr(int num, char *uprefix, char *buf, size_t len) > ^ > 1 error generated. > *** [strerror.o] Error code 1 > > I deleted /usr/obj, disabled META_MODE and ran the ``make buildworld'' > with -j1. > > My /usr/src is at r342569. Do you have WITHOUT_NLS set ? If yes, then the following should fix it. Confirm and I will commit. diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index be3732d5b9e..7cd984ea48f 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); * statically linked binaries. */ static void -errstr(int num, char *uprefix, char *buf, size_t len) +errstr(int num, const char *uprefix, char *buf, size_t len) { char *t; unsigned int uerr;