[libcamera-devel] [PATCH] libcamera: Fix compilation issue in musl environment
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jan 29 22:49:36 CET 2020
Hi Madhavan,
Thank you for the patch.
On Wed, Jan 29, 2020 at 12:16:27PM +0100, Madhavan Krishnan wrote:
> From: Madhavan Krishnan <madhavan.krishnan at linaro.org>
>
> New argument dev_t devnum has been added in the registerCamera()
> api and we are facing compilation issue in the musl environment
> since dev_t is not declared, we addded sys/stat.h header file
In addition to your Signed-off-by line, this should also have a Fixes
line pointing to the commit that introduced the issue. See for instance
commit 744fabcbb938d60cdbc0dfadc625bbd6798c2485 for a example.
> ---
> src/libcamera/include/pipeline_handler.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/include/pipeline_handler.h b/src/libcamera/include/pipeline_handler.h
> index a6c1e1f..c5f84aa 100644
> --- a/src/libcamera/include/pipeline_handler.h
> +++ b/src/libcamera/include/pipeline_handler.h
> @@ -12,6 +12,7 @@
> #include <memory>
> #include <set>
> #include <string>
> +#include <sys/stat.h>
POSIX mandates dev_t to be defined by sys/types.h, so I think that would
be a better header to include. sys/sysmacros.h should then be dropped as
it wasn't the correct choice. You can explain this in the commit
message, stating that sys/sysmacros.h was an incorrect choice, which
doesn't work with musl.
> #include <sys/sysmacros.h>
> #include <vector>
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list