mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 18:20:15 +00:00
Merge pull request #6772 from opensourcerouting/7.4/netbsd-tls-buf
[7.4] lib: fix TLS log buffer on NetBSD
This commit is contained in:
commit
78292ed227
@ -246,10 +246,10 @@ void zlog_tls_buffer_init(void)
|
|||||||
fchown(mmfd, zlog_uid, zlog_gid);
|
fchown(mmfd, zlog_uid, zlog_gid);
|
||||||
|
|
||||||
#ifdef HAVE_POSIX_FALLOCATE
|
#ifdef HAVE_POSIX_FALLOCATE
|
||||||
if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
|
if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) != 0)
|
||||||
#else
|
/* note next statement is under above if() */
|
||||||
if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
|
|
||||||
#endif
|
#endif
|
||||||
|
if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
|
||||||
zlog_err("failed to allocate thread log buffer \"%s\": %s",
|
zlog_err("failed to allocate thread log buffer \"%s\": %s",
|
||||||
mmpath, strerror(errno));
|
mmpath, strerror(errno));
|
||||||
goto out_anon_unlink;
|
goto out_anon_unlink;
|
||||||
|
Loading…
Reference in New Issue
Block a user