git: 71003b09a9e1 - main - x11-wm/niri: switch to upstream libc fix

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 18 Dec 2023 15:23:00 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=71003b09a9e188d698ae57c89ff20990d85ea972

commit 71003b09a9e188d698ae57c89ff20990d85ea972
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-12-17 18:34:55 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-12-18 15:22:34 +0000

    x11-wm/niri: switch to upstream libc fix
---
 x11-wm/niri/files/patch-libc-strftime | 65 ++++++++++++++++++++---------------
 1 file changed, 38 insertions(+), 27 deletions(-)

diff --git a/x11-wm/niri/files/patch-libc-strftime b/x11-wm/niri/files/patch-libc-strftime
index 10d9e80c8962..296be1dd4638 100644
--- a/x11-wm/niri/files/patch-libc-strftime
+++ b/x11-wm/niri/files/patch-libc-strftime
@@ -1,4 +1,4 @@
-https://github.com/rust-lang/libc/issues/3459
+https://github.com/rust-lang/libc/commit/aff5e66e5473
 
 error[E0425]: cannot find function `strftime` in crate `libc`
   --> src/utils.rs:44:24
@@ -6,30 +6,41 @@ error[E0425]: cannot find function `strftime` in crate `libc`
 44 |         let rv = libc::strftime(buf.as_mut_ptr().cast(), buf.len(), format.as_ptr(), tm);
    |                        ^^^^^^^^ not found in `libc`
 
---- src/utils.rs.orig	2023-11-26 12:51:13 UTC
-+++ src/utils.rs
-@@ -9,6 +9,24 @@ use std::time::Duration;
- use std::thread;
- use std::time::Duration;
- 
-+#[cfg(any(
-+    target_os = "dragonfly",
-+    target_os = "freebsd",
-+    target_os = "netbsd",
-+    target_os = "openbsd",
-+))]
-+mod libc {
-+    pub use libc::*;
-+    extern "C" {
-+        pub fn strftime(
-+            buf: *mut c_char,
-+            maxsize: size_t,
-+            format: *const c_char,
-+            timeptr: *const tm,
-+        ) -> size_t;
-+    }
-+}
+--- cargo-crates/libc-0.2.150/src/unix/bsd/apple/mod.rs.orig	2006-07-24 01:21:28 UTC
++++ cargo-crates/libc-0.2.150/src/unix/bsd/apple/mod.rs
+@@ -5602,12 +5602,6 @@ extern "C" {
+     pub fn asctime(tm: *const ::tm) -> *mut ::c_char;
+     pub fn ctime(clock: *const time_t) -> *mut ::c_char;
+     pub fn getdate(datestr: *const ::c_char) -> *mut ::tm;
+-    pub fn strftime(
+-        buf: *mut ::c_char,
+-        maxsize: ::size_t,
+-        format: *const ::c_char,
+-        timeptr: *const ::tm,
+-    ) -> ::size_t;
+     pub fn strptime(
+         buf: *const ::c_char,
+         format: *const ::c_char,
+--- cargo-crates/libc-0.2.150/src/unix/bsd/mod.rs.orig	2006-07-24 01:21:28 UTC
++++ cargo-crates/libc-0.2.150/src/unix/bsd/mod.rs
+@@ -899,6 +899,20 @@ extern "C" {
+         longopts: *const option,
+         longindex: *mut ::c_int,
+     ) -> ::c_int;
 +
- use anyhow::{ensure, Context};
- use directories::UserDirs;
- use smithay::reexports::rustix::time::{clock_gettime, ClockId};
++    pub fn strftime(
++        buf: *mut ::c_char,
++        maxsize: ::size_t,
++        format: *const ::c_char,
++        timeptr: *const ::tm,
++    ) -> ::size_t;
++    pub fn strftime_l(
++        buf: *mut ::c_char,
++        maxsize: ::size_t,
++        format: *const ::c_char,
++        timeptr: *const ::tm,
++        locale: ::locale_t,
++    ) -> ::size_t;
+ }
+ 
+ cfg_if! {