util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: util-linux@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>, Karel Zak <kzak@redhat.com>
Subject: [PATCH] lib/path: fix missing header for `struct stat`
Date: Thu, 17 Oct 2019 08:00:31 +0200	[thread overview]
Message-ID: <60c4df91a86c6d4a1f7c811d931030b9b2f5efdb.1571292019.git.ps@pks.im> (raw)

In commit b1418ed14 (lib/path: add ul_path_stat(), fix absolute paths,
2019-10-15), a new function `ul_path_stat()` was added to "path.h". This
new function prototype causes a compiler warning on musl libc based
systems due to one of the parameters having the unknown type `struct
stat` due to the <sys/stat.h> header not being included.

Fix the warning by including the header.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 include/path.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/path.h b/include/path.h
index 1378a8857..a9bab6dbe 100644
--- a/include/path.h
+++ b/include/path.h
@@ -3,6 +3,7 @@
 
 #include <stdio.h>
 #include <stdint.h>
+#include <sys/stat.h>
 #include <sys/types.h>
 #include <dirent.h>
 
-- 
2.23.0


             reply	other threads:[~2019-10-17  6:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  6:00 Patrick Steinhardt [this message]
2019-10-17 10:57 ` [PATCH] lib/path: fix missing header for `struct stat` Karel Zak

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=60c4df91a86c6d4a1f7c811d931030b9b2f5efdb.1571292019.git.ps@pks.im \
    --to=ps@pks.im \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).