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

* Re: Conditional sys/sysmacros.h inclusion
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2017-04-03  9:28 UTC (permalink / raw)
  To: Ingo Feinerer, linux-media

Hi Ingo,

I was about to commit this when I noticed that you didn't add a
Signed-off-by line in your email. We need that for v4l-utils.

See section 11 here:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD

for details about that tag.

Just reply with your Signed-off-by and I'll merge this patch.

Regards,

	Hans

On 03/13/2017 12:58 PM, Ingo Feinerer wrote:
> 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	[flat|nested] 4+ messages in thread

* Re: Conditional sys/sysmacros.h inclusion
  2017-04-03  9:28 ` Hans Verkuil
@ 2017-04-03 16:03   ` Ingo Feinerer
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Feinerer @ 2017-04-03 16:03 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media

On Mon, Apr 03, 2017 at 11:28:30AM +0200, Hans Verkuil wrote:
> I was about to commit this when I noticed that you didn't add a
> Signed-off-by line in your email. We need that for v4l-utils.
> 
> See section 11 here:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=HEAD
> 
> for details about that tag.
> 
> Just reply with your Signed-off-by and I'll merge this patch.

Thanks for the pointer and merging the patch!

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

^ permalink raw reply	[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.