All of lore.kernel.org
 help / color / mirror / Atom feed
* Conditional sys/sysmacros.h inclusion
@ 2017-03-13 11:58 Ingo Feinerer
  2017-04-03  9:28 ` Hans Verkuil
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Feinerer @ 2017-03-13 11:58 UTC (permalink / raw)
  To: linux-media

Hi,

please find attached a diff that makes the inclusion of the sys/sysmacros.h
header file conditional. I noticed it on OpenBSD which has no sys/sysmacros.h,
so compilation fails there.

Best regards,
Ingo

diff --git a/configure.ac b/configure.ac
index f3269728a..ae58da377 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,6 +146,7 @@ if test "x$gl_cv_func_ioctl_posix_signature" = xyes; then
 fi
 
 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+AC_HEADER_MAJOR
 
 # Check host os
 case "$host_os" in
diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
index 59f28b137..1e784eda8 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -20,7 +20,9 @@
  */
 
 #include <sys/types.h>
+#if defined(MAJOR_IN_SYSMACROS)
 #include <sys/sysmacros.h>
+#endif
 #include <sys/mman.h>
 #include <fcntl.h>
 #include <sys/stat.h>

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* Conditional sys/sysmacros.h inclusion
@ 2018-12-24  7:44 Ingo Feinerer
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Feinerer @ 2018-12-24  7:44 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil

[-- Attachment #1: Type: text/plain, Size: 279 bytes --]

Commit 380fe7d4548a99bfcfc1594b6f0b3dd2369978f1 broke the functionality on
OpenBSD as it has no sys/sysmacros.h. So replicate commit
08572e7db2120bc45db732d02409dfd3346b8e51 but use explicit OS checks instead of
AC_HEADER_MAJOR.

Signed-off-by: Ingo Feinerer <feinerer@logic.at>

[-- Attachment #2: sysmacros.diff --]
[-- Type: text/plain, Size: 403 bytes --]

diff --git a/lib/libv4lconvert/control/libv4lcontrol.c b/lib/libv4lconvert/control/libv4lcontrol.c
index 59f28b137b..793e19f299 100644
--- a/lib/libv4lconvert/control/libv4lcontrol.c
+++ b/lib/libv4lconvert/control/libv4lcontrol.c
@@ -20,7 +20,9 @@
  */
 
 #include <sys/types.h>
+#ifndef __OpenBSD__
 #include <sys/sysmacros.h>
+#endif
 #include <sys/mman.h>
 #include <fcntl.h>
 #include <sys/stat.h>

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

end of thread, other threads:[~2018-12-24  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 11:58 Conditional sys/sysmacros.h inclusion Ingo Feinerer
2017-04-03  9:28 ` Hans Verkuil
2017-04-03 16:03   ` Ingo Feinerer
2018-12-24  7:44 Ingo Feinerer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.