public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: walt <w41ter@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: udevil question for Helmut Jarausch
Date: Wed, 17 Jun 2015 16:04:17 -0700	[thread overview]
Message-ID: <mlsudh$hj1$1@ger.gmane.org> (raw)
In-Reply-To: <draPF0XZdL8xBcyxiGf/rK@2+6nZkqHK+6OdobPF1A04>

On 06/16/2015 02:32 AM, Helmut Jarausch wrote:
> 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).
>>
>> 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)?
>>
>> 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?
>>
>> 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?
>>
>> Thanks for any wisdom you care to share with us.
>>
> 
> The build log says
> 
>  device-info.c:943:33: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration]
>                                  stat( mount_source, &statbuf ) == 0 &&
>                                  ^
> device-info.c:944:33: error: implicit declaration of function 'S_ISBLK' [-Werror=implicit-function-declaration]
>                                  S_ISBLK( statbuf.st_mode ) )
> 
> which means the function stat isn't declared. Together with S_ISBLK it is clear that the C-function stat (to determine
> file status) is meant. 
> 
> man lstat    (man stat doesn't work here)

Strange, it works here.  I wonder if the difference is caused by your l10n, or
maybe a bug.  Are man pages always in English?  I've been pondering the switch
to man-db but I'm not motivated to deal with any fallout and disk space is cheap.

> 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 <sys/stat.h> has to be included somewhere

Thanks, good hints.

> No wisdom at all,

Hm.




  reply	other threads:[~2015-06-17 23:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 21:56 [gentoo-user] udevil question for Helmut Jarausch walt
2015-06-16  9:32 ` Helmut Jarausch
2015-06-17 23:04   ` walt [this message]
2015-06-18  7:13     ` [gentoo-user] " Marc Joliet
2015-06-18 14:19       ` Helmut Jarausch
2015-06-18 14:27         ` Peter Humphrey
2015-06-18 15:16           ` Helmut Jarausch
2015-06-18 15:37             ` Peter Humphrey
2015-06-18 15:41             ` Neil Bothwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='mlsudh$hj1$1@ger.gmane.org' \
    --to=w41ter@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox