[v4l-utils 3/5] utils/v4l2-compliance: Include <fcntl.h> instead of <sys/fcntl.h>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Code should not be including <sys/fcntl.h> header, but instead it
should include the public <fcntl.h> header.

On glibc and uClibc, <sys/fcntl.h> simply includes <fcntl.h>, but with
the musl C library, it spits out a warning telling you that you're not
doing the right thing:

In file included from ./v4l-helpers.h:12:0,
                 from ./cv4l-helpers.h:5,
                 from v4l2-compliance.h:36,
                 from v4l2-test-controls.cpp:33:
.../sysroot/usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
 #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx>
---
 utils/v4l2-compliance/v4l-helpers.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/v4l2-compliance/v4l-helpers.h b/utils/v4l2-compliance/v4l-helpers.h
index d8a273d..9aafa34 100644
--- a/utils/v4l2-compliance/v4l-helpers.h
+++ b/utils/v4l2-compliance/v4l-helpers.h
@@ -9,7 +9,7 @@
 #include <time.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/mman.h>
 #include <errno.h>
 
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux