From edbe64dbd3671252e755e9c66d061fdd9b7e686b Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 29 Sep 2024 17:29:35 +0200 Subject: [PATCH] remove cdefs.h from fts.h --- patches/src.freebsd.patch | 21 +++++++++++++++++++-- src.freebsd/include/fts.h | 10 +++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/patches/src.freebsd.patch b/patches/src.freebsd.patch index d1cfe08..acdf6f2 100644 --- a/patches/src.freebsd.patch +++ b/patches/src.freebsd.patch @@ -11040,7 +11040,20 @@ unsigned fts_flags; /* private flags for FTSENT structure */ #define FTS_AGAIN 1 /* read node again */ -@@ -128,10 +140,14 @@ +@@ -118,9 +130,10 @@ + FTS *fts_fts; /* back pointer to main FTS */ + } FTSENT; + +-#include ++#ifdef __cplusplus ++extern "C" { ++#endif + +-__BEGIN_DECLS + FTSENT *fts_children(FTS *, int); + int fts_close(FTS *); + void *fts_get_clientptr(FTS *); +@@ -128,10 +141,17 @@ FTS *fts_get_stream(FTSENT *); #define fts_get_stream(ftsent) ((ftsent)->fts_fts) FTS *fts_open(char * const *, int, @@ -11049,7 +11062,11 @@ FTSENT *fts_read(FTS *); int fts_set(FTS *, FTSENT *, int); void fts_set_clientptr(FTS *, void *); - __END_DECLS +-__END_DECLS ++ ++#ifdef __cplusplus ++} ++#endif + +#else +# include_next diff --git a/src.freebsd/include/fts.h b/src.freebsd/include/fts.h index ee603e4..59a237f 100644 --- a/src.freebsd/include/fts.h +++ b/src.freebsd/include/fts.h @@ -130,9 +130,10 @@ typedef struct _ftsent { FTS *fts_fts; /* back pointer to main FTS */ } FTSENT; -#include +#ifdef __cplusplus +extern "C" { +#endif -__BEGIN_DECLS FTSENT *fts_children(FTS *, int); int fts_close(FTS *); void *fts_get_clientptr(FTS *); @@ -144,7 +145,10 @@ FTS *fts_open(char * const *, int, FTSENT *fts_read(FTS *); int fts_set(FTS *, FTSENT *, int); void fts_set_clientptr(FTS *, void *); -__END_DECLS + +#ifdef __cplusplus +} +#endif #else # include_next