diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-05-27 03:49:25 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-05-31 19:26:59 +0300 |
commit | b602bbe8116695779abc246929b4a8b8949e59d4 (patch) | |
tree | f7f08e62dde2c238bbcb347a80e3f741796f4f67 | |
parent | 3370b6d0a0dfe1b554865d6e5bb8e20049220bf0 (diff) |
android: Don't rely on indirect inclusion of unistd.h
The standard C library close() and lseek() functions require inclusion
of the unistd.h header. Include it explicitly where needed instead of
relying on indirect inclusion.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
-rw-r--r-- | src/android/camera_device.cpp | 1 | ||||
-rw-r--r-- | src/android/camera_worker.cpp | 1 | ||||
-rw-r--r-- | src/android/mm/generic_camera_buffer.cpp | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 946ddc7a..fddc07ff 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -15,6 +15,7 @@ #include <fstream> #include <sys/mman.h> #include <tuple> +#include <unistd.h> #include <vector> #include <libcamera/control_ids.h> diff --git a/src/android/camera_worker.cpp b/src/android/camera_worker.cpp index 9f727826..98dddd9e 100644 --- a/src/android/camera_worker.cpp +++ b/src/android/camera_worker.cpp @@ -10,6 +10,7 @@ #include <errno.h> #include <string.h> #include <sys/poll.h> +#include <unistd.h> #include "camera_device.h" diff --git a/src/android/mm/generic_camera_buffer.cpp b/src/android/mm/generic_camera_buffer.cpp index 334498c1..cca88cf3 100644 --- a/src/android/mm/generic_camera_buffer.cpp +++ b/src/android/mm/generic_camera_buffer.cpp @@ -7,6 +7,8 @@ #include "../camera_buffer.h" +#include <unistd.h> + #include "libcamera/internal/buffer.h" #include "libcamera/internal/log.h" |