git: 6befd3347c1c - main - textproc/atom: Fix build on head

From: Chris Rees <crees_at_FreeBSD.org>
Date: Tue, 07 Mar 2023 22:55:53 UTC
The branch main has been updated by crees:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6befd3347c1c883aacbc09ede82d311ddc3b8be9

commit 6befd3347c1c883aacbc09ede82d311ddc3b8be9
Author:     Chris Rees <crees@FreeBSD.org>
AuthorDate: 2023-03-07 22:54:41 +0000
Commit:     Chris Rees <crees@FreeBSD.org>
CommitDate: 2023-03-07 22:55:35 +0000

    textproc/atom: Fix build on head
    
    Reported by:    pointyhat
---
 textproc/atom/files/patch-msg.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/textproc/atom/files/patch-msg.c b/textproc/atom/files/patch-msg.c
new file mode 100644
index 000000000000..b03304be69a0
--- /dev/null
+++ b/textproc/atom/files/patch-msg.c
@@ -0,0 +1,14 @@
+--- msg.c.orig	2023-03-07 22:52:52 UTC
++++ msg.c
+@@ -194,11 +194,7 @@ parse_preface(const char *template) {
+         fmt[p++] = *template;
+         if (state == percent) {
+             if (*template == 's')
+-#if defined(_POSIX_SOURCE)
+                 p += sprintf(fmt + p - 2, "%d", msg_severity) - 2;
+-#else
+-                p = strchr(sprintf(fmt + p - 2, "%d", msg_severity), 0) - fmt;
+-#endif
+             state = normal;
+         } else if (*template == '%')
+             state = percent;