mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
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>
This commit is contained in:
parent
aaeff46e52
commit
bc002e8537
5 changed files with 62 additions and 0 deletions
|
|
@ -12,6 +12,9 @@ ifeq ($(call try-cc,$(TCP_REPAIR_TEST),,),y)
|
|||
endif
|
||||
ifeq ($(call try-cc,$(PRLIMIT_TEST),,),y)
|
||||
$(Q) @echo '#define CONFIG_HAS_PRLIMIT' >> $@
|
||||
endif
|
||||
ifeq ($(call try-cc,$(STRLCPY_TEST),,),y)
|
||||
$(Q) @echo '#define CONFIG_HAS_STRLCPY' >> $@
|
||||
endif
|
||||
$(Q) @echo '#endif /* __CR_CONFIG_H__ */' >> $@
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue