2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 21:07:43 +00:00
criu/include/string.h
Cyrill Gorcunov bc002e8537 Add strlcpy helper
Same as kernel provides, adopted from Linux sources.

strlcpy is similar to strncpy but _always_ adds \0
at the end of string even if destination is shorter.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2013-08-28 19:06:43 +04:00

14 lines
243 B
C

#ifndef __CR_STRING_H__
#define __CR_STRING_H__
#include <sys/types.h>
#include <string.h>
#include "config.h"
#ifndef CONFIG_HAS_STRLCPY
extern size_t strlcpy(char *dest, const char *src, size_t size);
#endif
#endif /* __CR_STRING_H__ */