Skip to content

Conversation

@luisschwab
Copy link

strlcpy and strlcat are being redeclared by strlcpy.h. Removing the import fixes it.

~/git/bitcoin-seeder $ make
g++ -std=c++11 -pthread -O3 -g0 -march=native -Wall -Wno-unused -Wno-sign-compare -Wno-reorder -Wno-comment -c -o netbase.o netbase.cpp
In file included from netbase.cpp:13:
strlcpy.h:27:15: error: ‘size_t strlcpy(char*, const char*, size_t)’ redeclared inline without ‘gnu_inline’ attribute
   27 | inline size_t strlcpy(char *dst, const char *src, size_t siz)
      |               ^~~~~~~
In file included from /usr/include/features.h:502,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/c++config.h:679,
                 from /usr/include/c++/13/bits/requires_hosted.h:31,
                 from /usr/include/c++/13/string:38,
                 from netbase.h:7,
                 from netbase.cpp:6:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:150:1: note: ‘size_t strlcpy(char*, const char*, size_t)’ previously defined here
  150 | __NTH (strlcpy (char *__restrict __dest, const char *__restrict __src,
      | ^~~~~
strlcpy.h:62:15: error: ‘size_t strlcat(char*, const char*, size_t)’ redeclared inline without ‘gnu_inline’ attribute
   62 | inline size_t strlcat(char *dst, const char *src, size_t siz)
      |               ^~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:167:1: note: ‘size_t strlcat(char*, const char*, size_t)’ previously defined here
  167 | __NTH (strlcat (char *__restrict __dest, const char *__restrict __src,
      | ^~~~~
make: *** [Makefile:8: netbase.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant