mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 07:00:53 +00:00
libsysprof-capture: Use strlcpy() instead of g_strlcpy()
If the system doesn’t provide `strlcpy()` (FreeBSD does, Linux doesn’t), use an inbuilt copy instead. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #40
This commit is contained in:
@ -89,5 +89,12 @@ ssize_t _sysprof_sendfile (int out_fd,
|
||||
int in_fd,
|
||||
off_t *offset,
|
||||
size_t count);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRLCPY
|
||||
# define _sysprof_strlcpy(d,s,ds) strlcpy(d,s,ds)
|
||||
#else
|
||||
size_t _sysprof_strlcpy (char *dest,
|
||||
const char *src,
|
||||
size_t dest_size);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user