git: 0d4ebdd15ce4 - main - Mk/bsd.port.mk: mark 14.3 unsupported
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Jul 2026 20:34:42 UTC
The branch main has been updated by rene:
URL: https://cgit.FreeBSD.org/ports/commit/?id=0d4ebdd15ce4b043460b7e070a6464d8f8d518f7
commit 0d4ebdd15ce4b043460b7e070a6464d8f8d518f7
Author: Rene Ladan <rene@FreeBSD.org>
AuthorDate: 2026-05-26 20:29:50 +0000
Commit: Rene Ladan <rene@FreeBSD.org>
CommitDate: 2026-07-01 20:34:23 +0000
Mk/bsd.port.mk: mark 14.3 unsupported
all: drop supoprt for FreeBSD 14.3
While here clean up some leftovers from FreeBSD 13
Reviewed by: adamw, jbeich, kirill_varnakov.com, saheed, sunpoet
Approved by: portmgr (implicit)
Differential Revision: https://reviews.freebsd.org/D57282
---
Mk/bsd.port.mk | 2 +-
archivers/pbzip2/Makefile | 3 +-
biology/atac-seq/Makefile | 7 +---
databases/proxysql/Makefile | 8 +---
devel/samurai/Makefile | 6 ---
editors/libreoffice/Makefile | 5 ---
emulators/wine-devel/files/pkg32.sh | 4 +-
emulators/wine/files/pkg32.sh | 4 +-
net-mgmt/check_mysql_health/Makefile | 7 ----
.../files/extra-patch-plugins-scripts_subst.in | 11 -----
net/libifconfig/Makefile | 2 +-
net/libifconfig/distinfo | 2 -
net/libpfctl/Makefile | 2 +-
net/libpfctl/distinfo | 2 -
net/wifi-firmware-iwlwifi-kmod/Makefile | 4 +-
security/openssl-pkcs11provider/Makefile | 8 +---
www/nbytes/Makefile | 5 ---
x11-wm/sway/Makefile | 12 ------
x11-wm/sway/files/extra-patch-wordexp | 49 ----------------------
x11-wm/swayfx/Makefile | 12 ------
x11-wm/swayfx/files/extra-patch-wordexp | 49 ----------------------
21 files changed, 13 insertions(+), 191 deletions(-)
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 4b5aa3978325..f65ba75dd915 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1164,7 +1164,7 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC
. endif
_EXPORTED_VARS+= OSVERSION
-. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1403000
+. if ${OPSYS} == FreeBSD && ${OSVERSION} < 1404000
_UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\
are guaranteed to build on this system. Please upgrade to a supported release.
. if defined(ALLOW_UNSUPPORTED_SYSTEM)
diff --git a/archivers/pbzip2/Makefile b/archivers/pbzip2/Makefile
index 4c63e487822f..a219ceb163ec 100644
--- a/archivers/pbzip2/Makefile
+++ b/archivers/pbzip2/Makefile
@@ -19,8 +19,7 @@ PLIST_FILES= bin/pbzip2 bin/pbunzip2 \
post-patch:
@${REINPLACE_CMD} -e 's,PRI[iu]MAX, & ,g' ${WRKSRC}/pbzip2.cpp \
${WRKSRC}/BZ2StreamScanner.cpp
-.if ${OPSYS} == FreeBSD && (${OSVERSION} < 1403508 || \
- ${OSVERSION} >= 1500000 && ${OSVERSION} < 1500053)
+.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1500000 && ${OSVERSION} < 1500053)
# Spell target sources to be understood by both BSD and GNU make(1)
@${REINPLACE_CMD} -e '/-O2/s,^,#, ; s,$$^,$$>&,' \
${WRKSRC}/Makefile
diff --git a/biology/atac-seq/Makefile b/biology/atac-seq/Makefile
index a35f746a21ec..8c9a50b7d12e 100644
--- a/biology/atac-seq/Makefile
+++ b/biology/atac-seq/Makefile
@@ -15,6 +15,7 @@ LICENSE= BSD2CLAUSE
RUN_DEPENDS= sra-tools>0:biology/sra-tools \
fastq-trim>0:biology/fastq-trim \
fastqc>0:biology/fastqc \
+ ${PYTHON_PKGNAMEPREFIX}MACS3>0:biology/py-macs3@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}multiqc>0:biology/py-multiqc@${PY_FLAVOR} \
biolibc-tools>0:biology/biolibc-tools \
bwa>0:biology/bwa \
@@ -29,10 +30,4 @@ RUN_DEPENDS= sra-tools>0:biology/sra-tools \
USES= metaport python
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} != FreeBSD || ${OSVERSION} >= 1302509
-RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MACS3>0:biology/py-macs3@${PY_FLAVOR}
-.endif
-
.include <bsd.port.mk>
diff --git a/databases/proxysql/Makefile b/databases/proxysql/Makefile
index 5b652f1395cf..9931c8d5caf4 100644
--- a/databases/proxysql/Makefile
+++ b/databases/proxysql/Makefile
@@ -38,12 +38,6 @@ GROUPS= ${PORTNAME}
GH_ACCOUNT= sysown
-.include <bsd.port.pre.mk>
-
-.if (${OSVERSION} < 1400000 && ${SSL_DEFAULT} == "base")
-IGNORE= requires OpenSSL 3.x or greater
-.endif
-
post-patch:
@${REINPLACE_CMD} -e 's,/etc/,${ETCDIR}/,g' ${WRKSRC}/lib/ProxySQL_GloVars.cpp
@${REINPLACE_CMD} \
@@ -82,4 +76,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/src/proxysql.cfg \
${STAGEDIR}${ETCDIR}/proxysql.cfg.sample
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/samurai/Makefile b/devel/samurai/Makefile
index f7e6544356bf..4d125efe0450 100644
--- a/devel/samurai/Makefile
+++ b/devel/samurai/Makefile
@@ -24,10 +24,4 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/samu ${STAGEDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/samu.1 ${STAGEDIR}${PREFIX}/share/man/man1
-.include <bsd.port.options.mk>
-
-.if ${OPSYS}_${OSREL:R} == FreeBSD_13
-CFLAGS+= -D_XOPEN_SOURCE=700L
-.endif
-
.include <bsd.port.mk>
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index 93243bd79088..1b09fcedce72 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -364,11 +364,6 @@ MDDS_VERSION= 3.1
.include <bsd.port.pre.mk>
-.if ${OPSYS} == FreeBSD && ( \
- (${OSVERSION} >= 1400051 && ${OSVERSION} < 1400057))
-BROKEN= please update FreeBSD base system first to fix an ABI incompatibility
-.endif
-
.if ${ARCH} == powerpc || ${ARCH} == powerpcspe || ${ARCH} == powerpc64
CONFIGURE_ARGS+= --disable-skia
.endif
diff --git a/emulators/wine-devel/files/pkg32.sh b/emulators/wine-devel/files/pkg32.sh
index 41fed66b1045..3f0bbf24d386 100644
--- a/emulators/wine-devel/files/pkg32.sh
+++ b/emulators/wine-devel/files/pkg32.sh
@@ -30,8 +30,8 @@ run_pkg32_old()
shift
# Show what we're going to do, then do it.
- echo pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
- pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+ echo pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1404000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+ pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1404000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
}
if [ $# -gt 0 ]; then
diff --git a/emulators/wine/files/pkg32.sh b/emulators/wine/files/pkg32.sh
index 41fed66b1045..3f0bbf24d386 100644
--- a/emulators/wine/files/pkg32.sh
+++ b/emulators/wine/files/pkg32.sh
@@ -30,8 +30,8 @@ run_pkg32_old()
shift
# Show what we're going to do, then do it.
- echo pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
- pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+ echo pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1404000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+ pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1404000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
}
if [ $# -gt 0 ]; then
diff --git a/net-mgmt/check_mysql_health/Makefile b/net-mgmt/check_mysql_health/Makefile
index 3d7e25248969..0aa6fa758055 100644
--- a/net-mgmt/check_mysql_health/Makefile
+++ b/net-mgmt/check_mysql_health/Makefile
@@ -32,11 +32,4 @@ NAGIOSDIR?= /var/spool/nagios
PLIST_FILES= libexec/nagios/check_mysql_health
-.include <bsd.port.options.mk>
-
-# Change regexp for older awk
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1400000
-EXTRA_PATCHES= ${PATCHDIR}/extra-patch-plugins-scripts_subst.in
-.endif
-
.include <bsd.port.mk>
diff --git a/net-mgmt/check_mysql_health/files/extra-patch-plugins-scripts_subst.in b/net-mgmt/check_mysql_health/files/extra-patch-plugins-scripts_subst.in
deleted file mode 100644
index 22497c07c761..000000000000
--- a/net-mgmt/check_mysql_health/files/extra-patch-plugins-scripts_subst.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- plugins-scripts/subst.in.orig 2016-08-01 16:28:29.583644100 +0000
-+++ plugins-scripts/subst.in 2025-05-12 18:58:53.592280000 +0000
-@@ -41,7 +41,7 @@
-
- /^#! ?\/.*\/python/ {sub(/^#! ?\/.*\/python/,"#! @PYTHON@");}
- /^#! ?\/.*\/perl/ {sub(/^#! ?\/.*\/perl/,"#! @PERL@");}
--/^#! ?\/.*\/[a-z]{0,2}awk/ {sub(/^#! ?\/.*\/[a-z]{0,2}awk/,"#! @AWK@");}
-+/^#! ?\/.*\/[a-z]?[a-z]?awk/ {sub(/^#! ?\/.*\/[a-z]?[a-z]?awk/,"#! @AWK@");}
- /^#! ?\/.*\/sh/ {sub(/^#! ?\/.*\/sh/,"#! @SHELL@");}
-
- # add to libexecdir to INC for perl utils.pm
diff --git a/net/libifconfig/Makefile b/net/libifconfig/Makefile
index 214924bcaca0..55d8713cc869 100644
--- a/net/libifconfig/Makefile
+++ b/net/libifconfig/Makefile
@@ -50,7 +50,7 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/${h} ${STAGEDIR}${PREFIX}/include
.endfor
-_ALL_VERSIONS= 14.3 14.4 15.0 15.1
+_ALL_VERSIONS= 14.4 15.0 15.1
.if make(makesum)
DISTFILES= libifconfig-${_LIBIFCONFIG_HASH}.tar.gz
.for version in ${_ALL_VERSIONS}
diff --git a/net/libifconfig/distinfo b/net/libifconfig/distinfo
index 8c36d372c81d..6033e3dbfbc0 100644
--- a/net/libifconfig/distinfo
+++ b/net/libifconfig/distinfo
@@ -1,8 +1,6 @@
TIMESTAMP = 1780133032
SHA256 (libifconfig-454322c08b8a.tar.gz) = c4c5534db09d55a1f06d1aaa310f5f0fe86d76c93b1b9f1f03cbfaad3f6b4e77
SIZE (libifconfig-454322c08b8a.tar.gz) = 27283
-SHA256 (libifconfig-14.3_0.tar.gz) = 04069eacdf7ec216fad6769ab5fdc2d7e781cbb8e09f3d4356691984880f5fc7
-SIZE (libifconfig-14.3_0.tar.gz) = 23709
SHA256 (libifconfig-14.4_0.tar.gz) = ebc3fc680b9afd7cdc146e17f2b5fa65cf950135ca34b1e3792b665274f82ebf
SIZE (libifconfig-14.4_0.tar.gz) = 23714
SHA256 (libifconfig-15.0_0.tar.gz) = 75e8a9ff81a2e08c14d662a1016fa3b665cf35f49e4f8306f3f53fe1dae272ec
diff --git a/net/libpfctl/Makefile b/net/libpfctl/Makefile
index bd699af9f5b9..aaeaee87a923 100644
--- a/net/libpfctl/Makefile
+++ b/net/libpfctl/Makefile
@@ -36,7 +36,7 @@ do-install:
${LN} -s libpfctl.so.0 ${STAGEDIR}${PREFIX}/lib/libpfctl.so
${INSTALL_DATA} ${WRKSRC}/*.h ${STAGEDIR}${PREFIX}/include
-_ALL_VERSIONS= 14.3 14.4 15.0 15.1
+_ALL_VERSIONS= 14.4 15.0 15.1
.if make(makesum)
DISTFILES=
.for version in ${_ALL_VERSIONS}
diff --git a/net/libpfctl/distinfo b/net/libpfctl/distinfo
index fe68d9dedbff..722c83816fac 100644
--- a/net/libpfctl/distinfo
+++ b/net/libpfctl/distinfo
@@ -1,6 +1,4 @@
TIMESTAMP = 1746177054
-SHA256 (libpfctl-14.3_4.tar.gz) = 0dba9d47cb5990e3029641bca9958925f20b091456bb7fe140ce1f4e9e2c30ce
-SIZE (libpfctl-14.3_4.tar.gz) = 11678
SHA256 (libpfctl-14.4_4.tar.gz) = 07b91d4d39a69724d642d51db44e9124f2d57b715c5420e1f2cd6193a73a8d12
SIZE (libpfctl-14.4_4.tar.gz) = 11687
SHA256 (libpfctl-15.0_4.tar.gz) = f05d9a636e4b361b98d9056eead54c396600d427c61b2faafefde4baabbc9481
diff --git a/net/wifi-firmware-iwlwifi-kmod/Makefile b/net/wifi-firmware-iwlwifi-kmod/Makefile
index 61cf9fbd6d6b..4cd0db1b791b 100644
--- a/net/wifi-firmware-iwlwifi-kmod/Makefile
+++ b/net/wifi-firmware-iwlwifi-kmod/Makefile
@@ -101,10 +101,10 @@ DISTFILES_${FWDRV}= \
DISTFILES_${FWDRV}_lic=
### <<< main, stable/15, 15.0, 15.1
-### >>> 14.3, 14.4, stable/14
+### >>> 14.4, stable/14
DISTFILES_bz+= \
${FWSUBDIR}/iwlwifi-gl-c0-fm-c0-92.ucode${DISTURL_SUFFIX}
-### <<< 14.3, 14.4, stable/14
+### <<< 14.4, stable/14
### >>> iwx(4)
DISTFILES_22000+= \
diff --git a/security/openssl-pkcs11provider/Makefile b/security/openssl-pkcs11provider/Makefile
index 160b38f865aa..dcef2b296cb1 100644
--- a/security/openssl-pkcs11provider/Makefile
+++ b/security/openssl-pkcs11provider/Makefile
@@ -33,14 +33,8 @@ PLIST_FILES= lib/ossl-modules/pkcs11.so \
share/man/man7/provider-pkcs11.7.gz
# @comment\ @dir\ /usr/lib/ossl-modules
-.include <bsd.port.pre.mk>
-
-.if !defined(OPENSSL_PORT) && ${OSVERSION} < 1400000
-BROKEN= requires OpenSSL 3.0+, preferably 3.2+
-.endif
-
post-install:
${MKDIR} ${STAGEDIR}${PREFIX}/openssl
${INSTALL_DATA} ${WRKDIR}/pkcs11provider.cnf ${STAGEDIR}${PREFIX}/openssl/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/www/nbytes/Makefile b/www/nbytes/Makefile
index 90393bf539ba..77ddf70bfe42 100644
--- a/www/nbytes/Makefile
+++ b/www/nbytes/Makefile
@@ -22,9 +22,4 @@ CMAKE_TESTING_ON= NBYTES_ENABLE_TESTING
USE_GITHUB= yes
GH_ACCOUNT= nodejs
-# Remove after 14.3-RELEASE EoL (expected 2026-06-30)
-.if !exists(/usr/bin/clang-scan-deps)
-USES+= llvm:build
-.endif
-
.include <bsd.port.mk>
diff --git a/x11-wm/sway/Makefile b/x11-wm/sway/Makefile
index c4a4a9ff3ff0..9d287dd4dc7f 100644
--- a/x11-wm/sway/Makefile
+++ b/x11-wm/sway/Makefile
@@ -50,13 +50,6 @@ SWAYBG_RUN_DEPENDS= swaybg:x11/swaybg
X11_USE= XORG=xcb
X11_LIB_DEPENDS= libxcb-icccm.so:x11/xcb-util-wm
-.include <bsd.port.options.mk>
-
-# https://github.com/freebsd/freebsd-src/pull/1675
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1403505
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-wordexp
-.endif
-
post-patch:
# Let @sample handle default files under etc/
@${REINPLACE_CMD} -e '/config\.in/{ N; s/@BASENAME@/&.sample/; }' \
@@ -65,10 +58,5 @@ post-patch:
@${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \
-e '/project_version/s/@0@/${DISTVERSIONFULL}/' \
${WRKSRC}/meson.build
-.if exists(${.CURDIR}/files/extra-patch-wordexp)
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275328
- @${REINPLACE_CMD} -e 's/_POSIX_C_SOURCE=200809L/_XOPEN_SOURCE=700/' \
- ${WRKSRC}/meson.build
-.endif
.include <bsd.port.mk>
diff --git a/x11-wm/sway/files/extra-patch-wordexp b/x11-wm/sway/files/extra-patch-wordexp
deleted file mode 100644
index eb1f79f130f5..000000000000
--- a/x11-wm/sway/files/extra-patch-wordexp
+++ /dev/null
@@ -1,49 +0,0 @@
-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
-@@ -6,6 +6,8 @@
- #include <string.h>
- #include <strings.h>
- #include <wordexp.h>
-+#include <signal.h>
-+#include <sys/wait.h>
- #include "list.h"
- #include "log.h"
- #include "stringop.h"
-@@ -319,7 +321,33 @@ bool expand_path(char **path) {
- memmove(ptr + 1, ptr, strlen(ptr) + 1);
- *ptr = '\\';
- }
-- if (wordexp(*path, &p, 0) != 0 || p.we_wordv[0] == NULL) {
-+
-+ // FreeBSD wordexp bug workaround:
-+ // 1. Reset SIGCHLD handler
-+ // 2. Run wordexp
-+ // 3. Restore SIGCHLD handler and reap any processes that exited
-+ struct sigaction prev_action;
-+ struct sigaction new_action = {
-+ .sa_flags = SA_RESETHAND,
-+ };
-+ if (sigaction(SIGCHLD, &new_action, &prev_action) != 0) {
-+ sway_log(SWAY_ERROR, "Restoring sigchild before wordexp failed");
-+ return false;
-+ }
-+
-+ int res = wordexp(*path, &p, 0);
-+
-+ if (sigaction(SIGCHLD, &prev_action, NULL) != 0) {
-+ sway_log(SWAY_ERROR, "Restoring sigchild after wordexp failed");
-+ }
-+
-+ int status;
-+ 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);
- return false;
- }
diff --git a/x11-wm/swayfx/Makefile b/x11-wm/swayfx/Makefile
index 8a01a45e836a..3616b6c43841 100644
--- a/x11-wm/swayfx/Makefile
+++ b/x11-wm/swayfx/Makefile
@@ -54,13 +54,6 @@ SWAYBG_RUN_DEPENDS= swaybg:x11/swaybg
X11_USE= XORG=xcb
X11_LIB_DEPENDS= libxcb-icccm.so:x11/xcb-util-wm
-.include <bsd.port.options.mk>
-
-# https://github.com/freebsd/freebsd-src/pull/1675
-.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1403505
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-wordexp
-.endif
-
post-patch:
# Let @sample handle default files under etc/
@${REINPLACE_CMD} -e '/config\.in/{ N; s/@BASENAME@/&.sample/; }' \
@@ -69,10 +62,5 @@ post-patch:
@${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \
-e '/project_version/s/@0@/${DISTVERSIONFULL}/' \
${WRKSRC}/meson.build
-.if exists(${.CURDIR}/files/extra-patch-wordexp)
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275328
- @${REINPLACE_CMD} -e 's/_POSIX_C_SOURCE=200809L/_XOPEN_SOURCE=700/' \
- ${WRKSRC}/meson.build
-.endif
.include <bsd.port.mk>
diff --git a/x11-wm/swayfx/files/extra-patch-wordexp b/x11-wm/swayfx/files/extra-patch-wordexp
deleted file mode 100644
index eb1f79f130f5..000000000000
--- a/x11-wm/swayfx/files/extra-patch-wordexp
+++ /dev/null
@@ -1,49 +0,0 @@
-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
-@@ -6,6 +6,8 @@
- #include <string.h>
- #include <strings.h>
- #include <wordexp.h>
-+#include <signal.h>
-+#include <sys/wait.h>
- #include "list.h"
- #include "log.h"
- #include "stringop.h"
-@@ -319,7 +321,33 @@ bool expand_path(char **path) {
- memmove(ptr + 1, ptr, strlen(ptr) + 1);
- *ptr = '\\';
- }
-- if (wordexp(*path, &p, 0) != 0 || p.we_wordv[0] == NULL) {
-+
-+ // FreeBSD wordexp bug workaround:
-+ // 1. Reset SIGCHLD handler
-+ // 2. Run wordexp
-+ // 3. Restore SIGCHLD handler and reap any processes that exited
-+ struct sigaction prev_action;
-+ struct sigaction new_action = {
-+ .sa_flags = SA_RESETHAND,
-+ };
-+ if (sigaction(SIGCHLD, &new_action, &prev_action) != 0) {
-+ sway_log(SWAY_ERROR, "Restoring sigchild before wordexp failed");
-+ return false;
-+ }
-+
-+ int res = wordexp(*path, &p, 0);
-+
-+ if (sigaction(SIGCHLD, &prev_action, NULL) != 0) {
-+ sway_log(SWAY_ERROR, "Restoring sigchild after wordexp failed");
-+ }
-+
-+ int status;
-+ 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);
- return false;
- }