Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] lib/path: fix missing header for `struct stat`
@ 2019-10-17  6:00 Patrick Steinhardt
  2019-10-17 10:57 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Steinhardt @ 2019-10-17  6:00 UTC (permalink / raw)
  To: util-linux; +Cc: Patrick Steinhardt, Karel Zak

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] lib/path: fix missing header for `struct stat`
  2019-10-17  6:00 [PATCH] lib/path: fix missing header for `struct stat` Patrick Steinhardt
@ 2019-10-17 10:57 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2019-10-17 10:57 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: util-linux

On Thu, Oct 17, 2019 at 08:00:31AM +0200, Patrick Steinhardt wrote:
>  include/path.h | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17  6:00 [PATCH] lib/path: fix missing header for `struct stat` Patrick Steinhardt
2019-10-17 10:57 ` Karel Zak

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git