That bug was hidden because patch(1) returns '0' on that particular case.
To be fixed...
ok robert@
-# $OpenBSD: bsd.syspatch.mk,v 1.11 2017/06/05 09:47:54 robert Exp $
+# $OpenBSD: bsd.syspatch.mk,v 1.12 2017/06/06 20:34:07 ajacoutot Exp $
#
# Copyright (c) 2016-2017 Robert Nagy <robert@openbsd.org>
#
${_PATCH_COOKIE}: ${ERRATA}/${ERRATA}.patch
@echo '>> Applying ${ERRATA}.patch'; \
- su ${BUILDUSER} -c '/usr/bin/patch ${PATCH_ARGS} < ${ERRATA}/${ERRATA}.patch' || \
+ /usr/bin/patch ${PATCH_ARGS} < ${ERRATA}/${ERRATA}.patch || \
{ echo "***> ${ERRATA}.patch did not apply cleanly"; \
exit 1; };
@su ${BUILDUSER} -c 'touch $@'