From bfb3284e97a64bb42ec920dcd05256a1a2d64fe3 Mon Sep 17 00:00:00 2001 From: Alexey Dokuchaev Date: Thu, 25 Feb 2010 10:05:21 +0000 Subject: Fix the build on amd64 and sparc64 (at least). I can think of little reasons to unconditionally reimplement strlcat(3), which is being around in BSD for over a decade now, but WMII does it anyways. Apparently, somebody needs to reread Unix Haters Handbook. Despite the fact that return value of strlcat() does not seem to be used anywhere, I decided to keep their implementation instead of switching to kosher implementation from our libc, just in case of some weird bug-to-bug compatibility issue. Closes PR: ports/143594 Feature safe: yes --- x11-wm/wmii/Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/x11-wm/wmii/Makefile b/x11-wm/wmii/Makefile index c986c5183f90..22b83532b9ae 100644 --- a/x11-wm/wmii/Makefile +++ b/x11-wm/wmii/Makefile @@ -41,7 +41,7 @@ MAKE_ARGS+= -DNO_UTF8 .endif .if defined(WITH_SLIM_LAYOUT_BOX) -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-slim-layout-boxes +EXTRA_PATCHES= ${FILESDIR}/extra-patch-slim-layout-boxes .endif post-patch: .SILENT @@ -55,11 +55,10 @@ post-patch: .SILENT # Make actual compile/link commands appear in the build log ${REINPLACE_CMD} -e 's|^COMPILE=|& noisycc=yes| ; \ s|^LINK=|& noisycc=yes|' ${WRKSRC}/mk/hdr.mk +# Fix brain-damaged piece of code; otherwise it breaks on archs where +# `size_t' is not 32-bit unsigned integer (e.g. amd64, sparc64) + ${REINPLACE_CMD} -e '/wmii_strlcat/d' ${WRKSRC}/include/util.h + ${REINPLACE_CMD} -e 's|strlcat|wmii_&|' ${WRKSRC}/include/util.h \ + ${WRKSRC}/cmd/util.c ${WRKSRC}/cmd/wmii/client.c -.include - -.if ${ARCH} == "amd64" || ${ARCH} == "sparc64" -BROKEN= Does not compile on amd64 or sparc64 -.endif - -.include +.include -- cgit v1.2.3