From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 74F03138CE8 for ; Tue, 16 Jun 2015 09:32:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EC449E0831; Tue, 16 Jun 2015 09:32:34 +0000 (UTC) Received: from mailrelay102.isp.belgacom.be (mailrelay102.isp.belgacom.be [195.238.20.129]) by pigeon.gentoo.org (Postfix) with ESMTP id 65565E0384 for ; Tue, 16 Jun 2015 09:32:33 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=d6O4W030xngO5QkzyDOul/vmjwC4sFqcTOV5kZr+d1k= c=1 sm=2 a=NimUR-UY4PkA:10 a=kj9zAlcOel0A:10 a=Ft1gVQYh-wSHFPy7OmUA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BdBgBq7H9V/95hsFtbgxDEXoJUAoE5PBEBAQEBAQEBgQqEIwEBBDocPhg+KR6ITAGlZIdTjmCQSYtEhFM6FoQXBZNbjHWTAoNbJoN7PIJ4AQEB Received: from 222.97-176-91.adsl-dyn.isp.belgacom.be (HELO numa-be.localdomain) ([91.176.97.222]) by relay.skynet.be with ESMTP; 16 Jun 2015 11:32:32 +0200 Received: from numa-be (localhost [127.0.0.1]) by numa-be.localdomain (Postfix) with ESMTP id 47B039C62D2 for ; Tue, 16 Jun 2015 11:32:32 +0200 (CEST) Date: Tue, 16 Jun 2015 11:32:32 +0200 From: Helmut Jarausch Subject: Re: [gentoo-user] udevil question for Helmut Jarausch To: gentoo-user@lists.gentoo.org In-Reply-To: (from w41ter@gmail.com on Mon Jun 15 23:56:41 2015) X-Mailer: Balsa 2.5.2-2-g8a4db2d Message-Id: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 13de8999-32d6-453c-bec7-8b8a124c729f X-Archives-Hash: 13bc1cb706b0f6b0610952c4ca03b435 On 06/15/2015 11:56:41 PM, walt wrote: > Hi Helmut. sys-apps/udevil failed to compile this morning and I > noticed you > had already submitted a proposed fix for it (your patch worked, thank > you). >=20 > The failing code was already in the udevil package when I emerged it > on Jan > 21 with no problems, so some other package must have changed since Jan > 21, > but which one(s)? >=20 > I ask the question because I want to learn to think like a developer > (hold > all snarky comments until the professionals get here) so could you > describe > how you arrived at your fix so quickly? >=20 > Have you used the "stat" function so often that you didn't even need > to think > about how to fix it, or was it more complicated? >=20 > Thanks for any wisdom you care to share with us. >=20 The build log says device-info.c:943:33: error: implicit declaration of function 'stat' [-Wer= ror=3Dimplicit-function-declaration] stat( mount_source, &statbuf ) =3D=3D 0 && ^ device-info.c:944:33: error: implicit declaration of function 'S_ISBLK' [-W= error=3Dimplicit-function-declaration] S_ISBLK( statbuf.st_mode ) ) which means the function stat isn't declared. Together with S_ISBLK it is c= lear that the C-function stat (to determine file status) is meant.=20 man lstat (man stat doesn't work here) shows which header files have to be included. Furthermore grep -rF /usr/include S_ISBLK shows /usr/include/sys/stat.h:#define S_ISBLK(mode) .... Therefore has to be included somewhere . No wisdom at all, Helmut =