public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Helmut Jarausch <jarausch@skynet.be>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] udevil question for Helmut Jarausch
Date: Tue, 16 Jun 2015 11:32:32 +0200	[thread overview]
Message-ID: <draPF0XZdL8xBcyxiGf/rK@2+6nZkqHK+6OdobPF1A04> (raw)
In-Reply-To: <mlnhmq$141$1@ger.gmane.org> (from w41ter@gmail.com on Mon Jun 15 23:56:41 2015)

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)
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
.
No wisdom at all,
Helmut





  reply	other threads:[~2015-06-16  9:32 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 [this message]
2015-06-17 23:04   ` [gentoo-user] " walt
2015-06-18  7:13     ` 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=draPF0XZdL8xBcyxiGf/rK@2+6nZkqHK+6OdobPF1A04 \
    --to=jarausch@skynet.be \
    --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