Mercurial > dovecot > core-2.2
view src/lib/sendfile-util.h @ 22638:7d5634889da8
lib: net_ip2addr() - Optimize by allocating destination memory immediately
It doesn't really matter if we allocate a few extra bytes.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Sat, 04 Nov 2017 01:42:37 +0200 |
parents | e4eb71ae8e96 |
children |
line wrap: on
line source
#ifndef SENDFILE_UTIL_H #define SENDFILE_UTIL_H /* Wrapper for various sendfile()-like calls. Returns -1 and errno=EINVAL if it isn't supported for some reason (out_fd isn't a socket, offset is too large, or there simply is no sendfile()). */ ssize_t safe_sendfile(int out_fd, int in_fd, uoff_t *offset, size_t count); #endif