diff mbox series

[v4l-utils,v1] media-info: add missing sys/stat.h include (for dev_t)

Message ID 20231203125612.31945-1-ps.report@gmx.net
State New
Headers show
Series [v4l-utils,v1] media-info: add missing sys/stat.h include (for dev_t) | expand

Commit Message

Peter Seiderer Dec. 3, 2023, 12:56 p.m. UTC
Fixes musl libc compile failure:

  In file included from ../utils/v4l2-tracer/v4l2-tracer-common.h:11,
                   from ../utils/v4l2-tracer/trace.h:9,
                   from ../utils/v4l2-tracer/trace-helper.cpp:6:
  ../utils/common/media-info.h:40:34: error: ‘dev_t’ has not been declared
     40 | int mi_get_dev_t_from_fd(int fd, dev_t *dev);
        |                                  ^~~~~
  ../utils/common/media-info.h:48:39: error: ‘dev_t’ was not declared in this scope; did you mean ‘div_t’?
     48 | std::string mi_get_devpath_from_dev_t(dev_t dev);
        |                                       ^~~~~
        |                                       div_t

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 utils/common/media-info.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/utils/common/media-info.h b/utils/common/media-info.h
index a862b70b..c0dd6304 100644
--- a/utils/common/media-info.h
+++ b/utils/common/media-info.h
@@ -6,6 +6,8 @@ 
 #ifndef _MEDIA_INFO_H
 #define _MEDIA_INFO_H
 
+#include <sys/stat.h>
+
 enum media_type {
 	MEDIA_TYPE_CANT_STAT,
 	MEDIA_TYPE_UNKNOWN,