diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-10-29 02:58:44 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-11-18 02:33:53 +0200 |
commit | b465ecb3e32b8b71ed4137656c2b8e67030fa2e1 (patch) | |
tree | 7a41316832c8fcaea36fb5b461707b39519fa9ef | |
parent | 97a5855f3743eaf45404e0598b176f7c51c68351 (diff) |
libcamera: Fix compilation with uClibc and uClibc-ng
Neither uClibc nor uClibc-ng support O_TMPFILE. Define it in utils.h if
not defined.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r-- | src/libcamera/include/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcamera/include/utils.h b/src/libcamera/include/utils.h index 3efb11c1..a80f7d09 100644 --- a/src/libcamera/include/utils.h +++ b/src/libcamera/include/utils.h @@ -16,6 +16,15 @@ #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) +#ifndef __DOXYGEN__ + +/* uClibc and uClibc-ng don't provide O_TMPFILE */ +#ifndef O_TMPFILE +#define O_TMPFILE (020000000 | O_DIRECTORY) +#endif + +#endif + namespace libcamera { namespace utils { |