mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 20:51:17 +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);
|
||||
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
|
||||
#else
|
||||
if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
|
||||
if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) != 0)
|
||||
/* note next statement is under above if() */
|
||||
#endif
|
||||
if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
|
||||
zlog_err("failed to allocate thread log buffer \"%s\": %s",
|
||||
mmpath, strerror(errno));
|
||||
goto out_anon_unlink;
|
||||
|
Loading…
Reference in New Issue
Block a user