I was poking around trying to fix the FTBFS problem with direwolf and it
looks simple enough. As it has built before for years I assume it's related
to GCC 13.

Here's the error:
/builddir/build/BUILD/direwolf-1.6/src/direwolf.h:303:56: error: expected
declaration specifiers or '...' before string constant
  303 | #define strlcpy(dst,src,siz)
strlcpy_debug(dst,src,siz,__FILE__,__func__,__LINE__)
      |                                                        ^~~~~~~~

And here's the code snippet in question:
// These prevent /usr/include/gps.h from providing its own definition.
#define HAVE_STRLCAT 1
#define HAVE_STRLCPY 1


#define DEBUG_STRL 1

#if DEBUG_STRL

#define strlcpy(dst,src,siz)
strlcpy_debug(dst,src,siz,__FILE__,__func__,__LINE__)
#define strlcat(dst,src,siz)
strlcat_debug(dst,src,siz,__FILE__,__func__,__LINE__)

size_t strlcpy_debug(char *__restrict__ dst, const char *__restrict__ src,
size_t siz, const char *file, const char *func, int line);
size_t strlcat_debug(char *__restrict__ dst, const char *__restrict__ src,
size_t siz, const char *file, const char *func, int line);

#else

#define strlcpy(dst,src,siz) strlcpy_debug(dst,src,siz)
#define strlcat(dst,src,siz) strlcat_debug(dst,src,siz)

size_t strlcpy_debug(char *__restrict__ dst, const char *__restrict__ src,
size_t siz);
size_t strlcat_debug(char *__restrict__ dst, const char *__restrict__ src,
size_t siz);

#endif  /* DEBUG_STRL */
---

I tried moving the definitions above the #defines but that had no effect...

Thanks,
Richard
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to