pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
backport posix_fallocate fix in case posix_fallocate returns an error.
Module Name: pkgsrc-wip
Committed By: Frank Kardel <kardel%NetBSD.org@localhost>
Pushed By: kardel
Date: Mon Oct 12 20:43:05 2020 +0200
Changeset: 7a50165b7d28f2d47652e71cb63e2d0895a8eb18
Modified Files:
frr/distinfo
frr/patches/patch-lib_zlog.c
Log Message:
backport posix_fallocate fix in case
posix_fallocate returns an error.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7a50165b7d28f2d47652e71cb63e2d0895a8eb18
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
frr/distinfo | 2 +-
frr/patches/patch-lib_zlog.c | 29 ++++++++++++++---------------
2 files changed, 15 insertions(+), 16 deletions(-)
diffs:
diff --git a/frr/distinfo b/frr/distinfo
index f619b5f643..04c441e727 100644
--- a/frr/distinfo
+++ b/frr/distinfo
@@ -4,6 +4,6 @@ SHA1 (frr-7.4.tar.gz) = 97ee20790e59d672d6ce41a147dad7639de65e91
RMD160 (frr-7.4.tar.gz) = 6c8dbf18b9d59c6518d57b2a1869d827ff194448
SHA512 (frr-7.4.tar.gz) = d5c4e3bf7527bc094a65b24fda1b7a86f87e996fb3d98abe646e878274e0ca30f45aefca76816414b9d44607616cd2eb8ad118045b8986a92dd130f3a704162f
Size (frr-7.4.tar.gz) = 6074854 bytes
-SHA1 (patch-lib_zlog.c) = 00e70b92eae8e399ac3083fec815350463a6b0e0
+SHA1 (patch-lib_zlog.c) = 206b6c48129d8122bf23d245f3d86284e5057fee
SHA1 (patch-pkgsrc_zebra.sh.in) = b692068722ee5a06e4fd975edbf0a724dfc03ac9
SHA1 (patch-zebra_ioctl.c) = 99b7606564f4dc620df997889156b5c09f7fb396
diff --git a/frr/patches/patch-lib_zlog.c b/frr/patches/patch-lib_zlog.c
index bc14c78459..95725bc7ed 100644
--- a/frr/patches/patch-lib_zlog.c
+++ b/frr/patches/patch-lib_zlog.c
@@ -1,22 +1,21 @@
$NetBSD$
- As NetBSD currently (2020) implements
- posix_fallocate() but no file system supports it
- we need to stay away from posix_fallocate.
- Additionally the present frr code relies on
- negative errnos (as found e.g. in Linux) and
- also did not find in the manual that
- posix_fallocate() return the errno and does not set
- errno.
+ backport posix_fallocate fix in case
+ posix_fallocate returns an error.
--- lib/zlog.c.orig 2020-06-30 11:08:57.000000000 +0000
+++ lib/zlog.c
-@@ -245,7 +246,7 @@ void zlog_tls_buffer_init(void)
- }
+@@ -246,10 +246,10 @@ void zlog_tls_buffer_init(void)
fchown(mmfd, zlog_uid, zlog_gid);
--#ifdef HAVE_POSIX_FALLOCATE
-+#if defined(HAVE_POSIX_FALLOCATE) && !defined(__NetBSD__)
- if (posix_fallocate(mmfd, 0, TLS_LOG_BUF_SIZE) < 0) {
- #else
- if (ftruncate(mmfd, TLS_LOG_BUF_SIZE) < 0) {
+ #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;
Home |
Main Index |
Thread Index |
Old Index