X-Git-Url: https://repo.jachan.dev/binutils.git/blobdiff_plain/ad118caa9f690114d11384b0813f30980cc333f3..HEAD:/libctf/ctf-decls.h diff --git a/libctf/ctf-decls.h b/libctf/ctf-decls.h index c840b793c9..32a00ca2b9 100644 --- a/libctf/ctf-decls.h +++ b/libctf/ctf-decls.h @@ -1,5 +1,5 @@ /* Declarations for missing functions. - Copyright (C) 2019 Free Software Foundation, Inc. + Copyright (C) 2019-2022 Free Software Foundation, Inc. This file is part of libctf. @@ -24,6 +24,7 @@ #include #include +#include "libiberty.h" #if HAVE_QSORT_R_ARG_LAST static inline void @@ -45,7 +46,7 @@ ctf_qsort_compar_thunk (void *arg, const void *a, const void *b) { struct ctf_qsort_arg *qsort_arg = (struct ctf_qsort_arg *) arg; - return qsort_arg->compar (a, b, arg); + return qsort_arg->compar (a, b, qsort_arg->arg); } static inline void @@ -71,4 +72,8 @@ void ctf_qsort_r (void *base, size_t nmemb, size_t size, #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) +#if !HAVE_DECL_STPCPY +extern char *stpcpy (char *, const char *); +#endif + #endif /* _CTF_DECLS_H */