From 2aa80c392c31a91d5f58d224929194aba94f2b82 Mon Sep 17 00:00:00 2001 From: Daniel Hams Date: Sat, 12 Dec 2020 11:59:40 +0000 Subject: [PATCH] add back minimal fcntl.h needed for openat exposure --- libdicl/configure.ac | 2 +- libdicl/src/repl_headers/Makefile.am | 1 + libdicl/src/repl_headers/fcntl.h | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 libdicl/src/repl_headers/fcntl.h diff --git a/libdicl/configure.ac b/libdicl/configure.ac index 1fb35bf..42084ee 100644 --- a/libdicl/configure.ac +++ b/libdicl/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ(2.65) AC_INIT([libdicl], - [0.1.38], + [0.1.39], [daniel.hams@gmail.com]) AC_SUBST(ACLOCAL_AMFLAGS, "-I macros") diff --git a/libdicl/src/repl_headers/Makefile.am b/libdicl/src/repl_headers/Makefile.am index 21bbd24..c880c2c 100644 --- a/libdicl/src/repl_headers/Makefile.am +++ b/libdicl/src/repl_headers/Makefile.am @@ -18,6 +18,7 @@ replinclude_HEADERS= \ dirent.h \ endian.h \ error.h \ + fcntl.h \ fnmatch.h \ getopt-cdefs.h \ getopt-core.h \ diff --git a/libdicl/src/repl_headers/fcntl.h b/libdicl/src/repl_headers/fcntl.h new file mode 100644 index 0000000..49c9910 --- /dev/null +++ b/libdicl/src/repl_headers/fcntl.h @@ -0,0 +1,21 @@ +#ifndef LIBDICL_FCNTL_H +#define LIBDICL_FCNTL_H + +#if defined(__GNUC__) +#include_next +#else +#include "/usr/include/fcntl.h" +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + + /* Missing pieces */ + extern int openat(int fd, const char *path, int oflag, ...); + +#if defined(__cplusplus) +} +#endif + +#endif