[libcamera-devel] libcamera: device_enumerator_udev: Include missing header

Message ID 20190428232322.31151-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit 7022136aaa66e06e8b6400ae247a9c151099dc9b
Headers show
Series
  • [libcamera-devel] libcamera: device_enumerator_udev: Include missing header
Related show

Commit Message

Laurent Pinchart April 28, 2019, 11:23 p.m. UTC
The makedev() macro is defined in sys/sysmacros.h, include the header
explicitly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/libcamera/device_enumerator_udev.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Jacopo Mondi April 28, 2019, 11:58 p.m. UTC | #1
Hi Laurent,

On Mon, Apr 29, 2019 at 02:23:22AM +0300, Laurent Pinchart wrote:
> The makedev() macro is defined in sys/sysmacros.h, include the header
> explicitly.

Thank you.

With this, we're only 1 error away to succesfully compile with the
clang version shipped by ChromeOS, so please push this.

Thanks
   j


>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/libcamera/device_enumerator_udev.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
> index cb2d21b90506..86f6ca184698 100644
> --- a/src/libcamera/device_enumerator_udev.cpp
> +++ b/src/libcamera/device_enumerator_udev.cpp
> @@ -11,6 +11,7 @@
>  #include <libudev.h>
>  #include <string.h>
>  #include <sys/ioctl.h>
> +#include <sys/sysmacros.h>
>  #include <unistd.h>
>
>  #include <libcamera/event_notifier.h>
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp
index cb2d21b90506..86f6ca184698 100644
--- a/src/libcamera/device_enumerator_udev.cpp
+++ b/src/libcamera/device_enumerator_udev.cpp
@@ -11,6 +11,7 @@ 
 #include <libudev.h>
 #include <string.h>
 #include <sys/ioctl.h>
+#include <sys/sysmacros.h>
 #include <unistd.h>
 
 #include <libcamera/event_notifier.h>