pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/protobuf
Module Name: pkgsrc
Committed By: sborrill
Date: Mon Jul 6 14:03:04 UTC 2026
Modified Files:
pkgsrc/devel/protobuf: distinfo
Added Files:
pkgsrc/devel/protobuf/patches:
patch-src_google_protobuf_io_zero_copy_stream_impl.cc
Log Message:
protobuf: fix build with pkgsrc gcc-10
Removing #define _POSIX_C_SOURCE 202405L is sufficient to fix the build
with pkgsrc gcc10.
This is for this bit of code:
int robust_close(int fd) {
#if defined(POSIX_CLOSE_RESTART)
return posix_close(fd, 0);
#else
return close(fd);
#endif
}
On most operating systems, posix_close doesn't exist anyway, so this code
is all irrelevant:
https://www.gnu.org/software/gnulib/manual/html_node/posix_005fclose.html
To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 pkgsrc/devel/protobuf/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/protobuf/patches/patch-src_google_protobuf_io_zero_copy_stream_impl.cc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/protobuf/distinfo
diff -u pkgsrc/devel/protobuf/distinfo:1.101 pkgsrc/devel/protobuf/distinfo:1.102
--- pkgsrc/devel/protobuf/distinfo:1.101 Fri Jun 12 04:29:48 2026
+++ pkgsrc/devel/protobuf/distinfo Mon Jul 6 14:03:04 2026
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.101 2026/06/12 04:29:48 adam Exp $
+$NetBSD: distinfo,v 1.102 2026/07/06 14:03:04 sborrill Exp $
BLAKE2s (protobuf-35.1.tar.gz) = 6a5d80600b6452d1b4f7cedf67985210fbbbb4231ca6dce296f85843bfe7d89b
SHA512 (protobuf-35.1.tar.gz) = 3cf3bd6cf7789fe65b57f3062ca3eebcf1660fbabe2c8c8504382052cb47f3a2b9ea146579a0fde58edacb53fa8c6f9eee3efee4250c9facc872e6cb0755568e
Size (protobuf-35.1.tar.gz) = 7146181 bytes
SHA1 (patch-src_file__lists.cmake) = 0b693792cefcff5bed559c6abbe9092e4fb1efdc
+SHA1 (patch-src_google_protobuf_io_zero_copy_stream_impl.cc) = 379eeacfd54d4d3ad577844449d44e29d16ce254
Added files:
Index: pkgsrc/devel/protobuf/patches/patch-src_google_protobuf_io_zero_copy_stream_impl.cc
diff -u /dev/null pkgsrc/devel/protobuf/patches/patch-src_google_protobuf_io_zero_copy_stream_impl.cc:1.1
--- /dev/null Mon Jul 6 14:03:04 2026
+++ pkgsrc/devel/protobuf/patches/patch-src_google_protobuf_io_zero_copy_stream_impl.cc Mon Jul 6 14:03:04 2026
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_google_protobuf_io_zero_copy_stream_impl.cc,v 1.1 2026/07/06 14:03:04 sborrill Exp $
+
+Defining _POSIX_C_SOURCE breaks the build with pkgsrc gcc10.
+It is only used to bring in posix_close which is not available
+on most platforms, so make Linux-only:
+https://www.gnu.org/software/gnulib/manual/html_node/posix_005fclose.html
+
+--- src/google/protobuf/io/zero_copy_stream_impl.cc.orig 2026-07-02 16:27:56.892638162 +0000
++++ src/google/protobuf/io/zero_copy_stream_impl.cc 2026-07-03 14:15:11.882956200 +0000
+@@ -10,7 +10,9 @@
+ // Sanjay Ghemawat, Jeff Dean, and others.
+
+ // We request posix_close if available. See the comment on "robust_close".
++#ifdef __linux__
+ #define _POSIX_C_SOURCE 202405L
++#endif
+
+ #ifndef _MSC_VER
+ #include <fcntl.h>
Home |
Main Index |
Thread Index |
Old Index