diff mbox series

[2/2] copyhandler: add missing unistd.h include

Message ID 20250107022008.104538-2-dominique.martinet@atmark-techno.com
State Accepted
Headers show
Series [1/2] ipc: add missing unistd.h include | expand

Commit Message

Dominique Martinet Jan. 7, 2025, 2:20 a.m. UTC
close() requires unistd.h include.

Note that musl does not provide FTW_CONTINUE/STOP, so copy_handler cannot
be built on musl anyway; this is only a theorical fix.

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
 handlers/copy_handler.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic Jan. 8, 2025, 7:53 p.m. UTC | #1
On 07.01.25 03:20, Dominique Martinet wrote:
> close() requires unistd.h include.
>
> Note that musl does not provide FTW_CONTINUE/STOP, so copy_handler cannot
> be built on musl anyway; this is only a theorical fix.
>
> Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
> ---
>   handlers/copy_handler.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/handlers/copy_handler.c b/handlers/copy_handler.c
> index 222bc9f5cfd3..f888a43baddc 100644
> --- a/handlers/copy_handler.c
> +++ b/handlers/copy_handler.c
> @@ -24,6 +24,7 @@
>   #else
>   #include <linux/fs.h>
>   #endif
> +#include <unistd.h>
>
>   #include <pctl.h>
>   #include "swupdate_image.h"

Reviewed-by : Stefano Babic <stefano.babic@swupdate.org>
diff mbox series

Patch

diff --git a/handlers/copy_handler.c b/handlers/copy_handler.c
index 222bc9f5cfd3..f888a43baddc 100644
--- a/handlers/copy_handler.c
+++ b/handlers/copy_handler.c
@@ -24,6 +24,7 @@ 
 #else
 #include <linux/fs.h>
 #endif
+#include <unistd.h>
 
 #include <pctl.h>
 #include "swupdate_image.h"