git: a873107d61d8 - main - x11-wm/sway: unbreak config reload after bb43067a6928

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 15 Sep 2025 11:40:04 UTC
The branch main has been updated by jbeich:

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

commit a873107d61d87133f66a9e56fbd7126f8504ced3
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2025-09-15 11:23:52 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2025-09-15 11:39:16 +0000

    x11-wm/sway: unbreak config reload after bb43067a6928
    
    Obtained from:  upstream
---
 x11-wm/sway/Makefile                  | 1 +
 x11-wm/sway/files/extra-patch-wordexp | 8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/x11-wm/sway/Makefile b/x11-wm/sway/Makefile
index caf623eafae1..120ae0e8cd0a 100644
--- a/x11-wm/sway/Makefile
+++ b/x11-wm/sway/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	sway
 DISTVERSION=	1.11
+PORTREVISION=	1
 CATEGORIES=	x11-wm wayland
 
 MAINTAINER=	jbeich@FreeBSD.org
diff --git a/x11-wm/sway/files/extra-patch-wordexp b/x11-wm/sway/files/extra-patch-wordexp
index 5a9f187e11df..1209fefbe87e 100644
--- a/x11-wm/sway/files/extra-patch-wordexp
+++ b/x11-wm/sway/files/extra-patch-wordexp
@@ -1,4 +1,5 @@
 https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
+https://github.com/swaywm/sway/issues/8828#issuecomment-3290045852
 
 --- common/stringop.c.orig	2025-04-20 11:31:10 UTC
 +++ common/stringop.c
@@ -11,7 +12,7 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
  #include "list.h"
  #include "log.h"
  #include "stringop.h"
-@@ -318,11 +320,34 @@ bool expand_path(char **path) {
+@@ -318,11 +320,37 @@ bool expand_path(char **path) {
  		char *ptr = strstr(*path, "  ") + 1;
  		memmove(ptr + 1, ptr, strlen(ptr) + 1);
  		*ptr = '\\';
@@ -42,7 +43,10 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
 +       }
 +
 +       int status;
-+       while (waitpid(-1, &status, WNOHANG) != -1 || errno == EINTR);
++       int wres;
++       do {
++               wres = waitpid(-1, &status, WNOHANG);
++       } while (wres > 0 || (wres == -1 && errno == EINTR));
 +
 +       if (res != 0 || p.we_wordv[0] == NULL) {
 +               wordfree(&p);