Fix includes in `copy.h` when using `sendfile()`
This commit is contained in:
parent
ec891b48f6
commit
9b1a7b3bf4
18
io/copy.h
18
io/copy.h
|
@ -2,17 +2,19 @@
|
||||||
#define IOUTILITIES_COPY_H
|
#define IOUTILITIES_COPY_H
|
||||||
|
|
||||||
#include "./nativefilestream.h"
|
#include "./nativefilestream.h"
|
||||||
|
#if defined(CPP_UTILITIES_USE_NATIVE_FILE_BUFFER) && defined(PLATFORM_LINUX)
|
||||||
|
#define CPP_UTILITIES_USE_SEND_FILE
|
||||||
|
#include "../conversion/stringbuilder.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CPP_UTILITIES_USE_SEND_FILE
|
||||||
|
#include <errno.h>
|
||||||
|
#include <sys/sendfile.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#ifdef CPP_UTILITIES_USE_SEND_FILE
|
||||||
#if defined(CPP_UTILITIES_USE_NATIVE_FILE_BUFFER) && defined(PLATFORM_LINUX)
|
|
||||||
#define CPP_UTILITIES_USE_SEND_FILE
|
|
||||||
#include <c++utilities/conversion/stringbuilder.h>
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sys/sendfile.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue