Merge "Only Windows doesn't have <sys/uio.h>."
This commit is contained in:
commit
c0ac9313e9
2 changed files with 10 additions and 7 deletions
|
|
@ -14,20 +14,23 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
|
||||||
// implementation of sys/uio.h for platforms that don't have it (Win32)
|
|
||||||
//
|
|
||||||
#ifndef _LIBS_CUTILS_UIO_H
|
#ifndef _LIBS_CUTILS_UIO_H
|
||||||
#define _LIBS_CUTILS_UIO_H
|
#define _LIBS_CUTILS_UIO_H
|
||||||
|
|
||||||
#ifdef HAVE_SYS_UIO_H
|
#if !defined(_WIN32)
|
||||||
|
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Implementation of sys/uio.h for Win32.
|
||||||
|
//
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
struct iovec {
|
struct iovec {
|
||||||
|
|
@ -42,7 +45,7 @@ extern int writev( int fd, const struct iovec* vecs, int count );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !HAVE_SYS_UIO_H */
|
#endif
|
||||||
|
|
||||||
#endif /* _LIBS_UTILS_UIO_H */
|
#endif /* _LIBS_UTILS_UIO_H */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HAVE_SYS_UIO_H
|
#if defined(_WIN32)
|
||||||
|
|
||||||
#include <log/uio.h>
|
#include <log/uio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -73,4 +73,4 @@ Exit:
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !HAVE_SYS_UIO_H */
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue