mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 17:14:28 +00:00
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>
13 lines
243 B
C
13 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__ */
|