ports/www/iridium/files/patch-third__party_nasm_BUILD.gn
Joseph Mingrone 93e25e566d
www/{*chromium,iridium}: Fix build after src snapshot 0c47b9c211
After src snapshot 0c47b9c211e, the build began failing with:

../../third_party/nasm/include/compiler.h:249:21: error: static
  declaration of 'mempcpy' follows non-static declaration
  249 | static inline void *mempcpy(void *dst, const void *src, size_t n)
      |                     ^
/usr/include/string.h:71:8: note: previous declaration is here
   71 | void    *(mempcpy)(void * __restrict,
                           const void * __restrict,size_t);

Fix the build by updating the pattern used to detect mempcpy(3) in
string.h.

Reviewed by:	rnagy (earlier revision)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D46055
2024-07-28 13:12:23 -03:00

16 lines
474 B
Text

--- third_party/nasm/BUILD.gn.orig 2024-06-24 21:00:43 UTC
+++ third_party/nasm/BUILD.gn
@@ -63,6 +63,13 @@ config("nasm_config") {
defines = [ "HAVE_CONFIG_H" ]
+ _string_h_lines =
+ read_file("/usr/include/string.h", "list lines")
+ _mempcpy = filter_include(_string_h_lines, [ "*mempcpy*" ])
+ if (_mempcpy != []) {
+ defines += [ "HAVE_MEMPCPY=1" ]
+ }
+
if (is_clang) {
cflags = [
# The inline functions in NASM's headers flag this.