1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00

devel/electron12: fix build

In file included from ../../third_party/nasm/asm/assemble.c:178:
../../third_party/nasm/include/compiler.h:249:21: error: static declaration of 'mempcpy' follows non-static declaration
static inline void *mempcpy(void *dst, const void *src, size_t n)
                    ^
/usr/include/string.h:70:7: note: previous declaration is here
void    *mempcpy(void * __restrict, const void * __restrict, size_t);
         ^

PR:		257378
Reported by:	Robert Cina <transitive@gmail.com>
Tested by:	meta
Approved by:	maintainer timeout (> 2 weeks)
MFH:		2021Q4
This commit is contained in:
Tomoaki AOKI 2021-10-06 17:52:26 +09:00 committed by Koichiro Iwao
parent 15d61162f7
commit 9cdeb88eac
3 changed files with 17 additions and 9 deletions

View File

@ -152,6 +152,12 @@ GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles
.include "Makefile.version"
.include <bsd.port.pre.mk>
# Add extra-patch-no-mempcpy-nasm only when there's no mempcpy() in base.
# Nested variable expansion avoids executing the test when not needed for
# expanding EXTRA_PATCHES.
EXTRA_PATCHES+= ${"${:!${GREP} mempcpy ${CROSS_SYSROOT}/usr/include/string.h \
|| ${TRUE}!}" == "":?${PATCHDIR}/extra-patch-no-mempcpy-nasm:}
.if ${ARCH} == "amd64"
PLIST_SUB+= AMD64=""
.else

View File

@ -0,0 +1,11 @@
--- third_party/nasm/config/config-linux.h.orig 2021-01-07 00:39:33 UTC
+++ third_party/nasm/config/config-linux.h
@@ -336,7 +336,7 @@
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
-#define HAVE_MEMPCPY 1
+/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1

View File

@ -18,15 +18,6 @@
/* Define to 1 if you have the `faccessat' function. */
#define HAVE_FACCESSAT 1
@@ -336,7 +336,7 @@
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mempcpy' function. */
-#define HAVE_MEMPCPY 1
+/* #undef HAVE_MEMPCPY */
/* Define to 1 if you have a working `mmap' system call. */
#define HAVE_MMAP 1
@@ -411,7 +411,7 @@
#define HAVE_SYSCONF 1