linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs
@ 2016-10-27 10:50 Sakari Ailus
  2016-11-21 13:33 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2016-10-27 10:50 UTC (permalink / raw)
  To: linux-media

struct timeval and struct timespec are defined in linux/time.h. Explicitly
include the header if __KERNEL__ is defined.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 include/uapi/linux/videodev2.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 4364ce6..bbab50c 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -61,6 +61,7 @@
 #endif
 #include <linux/compiler.h>
 #include <linux/ioctl.h>
+#include <linux/time.h>
 #include <linux/types.h>
 #include <linux/v4l2-common.h>
 #include <linux/v4l2-controls.h>
-- 
2.7.4


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

* Re: [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs
  2016-10-27 10:50 [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs Sakari Ailus
@ 2016-11-21 13:33 ` Mauro Carvalho Chehab
  2016-11-21 13:51   ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2016-11-21 13:33 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

Em Thu, 27 Oct 2016 13:50:51 +0300
Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:

> struct timeval and struct timespec are defined in linux/time.h. Explicitly
> include the header if __KERNEL__ is defined.

The patch below doesn't do what you're mentioned above. It unconditionally
include linux/time.h, and, for userspace, it will *also* include
sys/time.h...

I suspect that this would cause problems on userspace.

Btw, you didn't mention on your description what's the bug you're
trying to fix.

> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  include/uapi/linux/videodev2.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 4364ce6..bbab50c 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -61,6 +61,7 @@
>  #endif
>  #include <linux/compiler.h>
>  #include <linux/ioctl.h>
> +#include <linux/time.h>
>  #include <linux/types.h>
>  #include <linux/v4l2-common.h>
>  #include <linux/v4l2-controls.h>


Thanks,
Mauro

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

* Re: [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs
  2016-11-21 13:33 ` Mauro Carvalho Chehab
@ 2016-11-21 13:51   ` Sakari Ailus
  2016-11-21 14:08     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2016-11-21 13:51 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media

Hi Mauro,

On 11/21/16 15:33, Mauro Carvalho Chehab wrote:
> Em Thu, 27 Oct 2016 13:50:51 +0300
> Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> 
>> struct timeval and struct timespec are defined in linux/time.h. Explicitly
>> include the header if __KERNEL__ is defined.
> 
> The patch below doesn't do what you're mentioned above. It unconditionally
> include linux/time.h, and, for userspace, it will *also* include
> sys/time.h...

My bad... I thought writing a single line patch would be easy. ;-) Will fix.

> 
> I suspect that this would cause problems on userspace.
> 
> Btw, you didn't mention on your description what's the bug you're
> trying to fix.

The problem is a compiler error due to lacking defition for a struct.
I'll add that to v2.

-- 
Regards,

Sakari Ailus
sakari.ailus@linux.intel.com

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

* Re: [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs
  2016-11-21 13:51   ` Sakari Ailus
@ 2016-11-21 14:08     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2016-11-21 14:08 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

Em Mon, 21 Nov 2016 15:51:56 +0200
Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:

> Hi Mauro,
> 
> On 11/21/16 15:33, Mauro Carvalho Chehab wrote:
> > Em Thu, 27 Oct 2016 13:50:51 +0300
> > Sakari Ailus <sakari.ailus@linux.intel.com> escreveu:
> >   
> >> struct timeval and struct timespec are defined in linux/time.h. Explicitly
> >> include the header if __KERNEL__ is defined.  
> > 
> > The patch below doesn't do what you're mentioned above. It unconditionally
> > include linux/time.h, and, for userspace, it will *also* include
> > sys/time.h...  
> 
> My bad... I thought writing a single line patch would be easy. ;-) Will fix.
> 
> > 
> > I suspect that this would cause problems on userspace.
> > 
> > Btw, you didn't mention on your description what's the bug you're
> > trying to fix.  
> 
> The problem is a compiler error due to lacking defition for a struct.
> I'll add that to v2.

On userspace or Kernelspace? Please be clear at version 2, adding the
relevant info about how you got it.


Thanks,
Mauro

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

end of thread, other threads:[~2016-11-21 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-27 10:50 [PATCH 1/1] v4l: videodev2: Include linux/time.h for timeval and timespec structs Sakari Ailus
2016-11-21 13:33 ` Mauro Carvalho Chehab
2016-11-21 13:51   ` Sakari Ailus
2016-11-21 14:08     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).