This change makes posix-fdtab no longer a hard dependency of posix-pipe,
allowing non-fd parts of its functionality to work without the former
selected.
Signed-off-by: Andrei Tatar <andrei@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Sergiu Moga <sergiu@unikraft.io>
GitHub-Closes: #1437
#define __UKPOSIX_PIPE_H__
#include <uk/file.h>
-#include <uk/posix-fdtab.h>
/* File creation */
-
int uk_pipefile_create(struct uk_file *pipes[2]);
/* Internal syscalls */
-
+#if CONFIG_LIBPOSIX_FDTAB
int uk_sys_pipe(int pipefd[2], int flags);
+#endif /* CONFIG_LIBPOSIX_FDTAB */
#endif /* __UKPOSIX_PIPE_H__ */
#include <uk/file/nops.h>
#include <uk/posix-fd.h>
#include <uk/posix-pipe.h>
+
+#if CONFIG_LIBPOSIX_FDTAB
+#include <uk/posix-fdtab.h>
#include <uk/syscall.h>
+#endif /* CONFIG_LIBPOSIX_FDTAB */
#define PIPE_SIZE (1L << CONFIG_LIBPOSIX_PIPE_SIZE_ORDER)
return 0;
}
+#if CONFIG_LIBPOSIX_FDTAB
/* Internal syscalls */
#define _OPEN_FLAGS (O_CLOEXEC|O_NONBLOCK|O_DIRECT)
{
return uk_sys_pipe(pipefd, flags);
}
+#endif /* CONFIG_LIBPOSIX_FDTAB */