Skip to content

Commit

Permalink
remove cdefs.h from fts.h
Browse files Browse the repository at this point in the history
  • Loading branch information
q66 committed Sep 29, 2024
1 parent 083278c commit edbe64d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
21 changes: 19 additions & 2 deletions patches/src.freebsd.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sys/cdefs.h>
+#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,
Expand All @@ -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 <fts.h>
Expand Down
10 changes: 7 additions & 3 deletions src.freebsd/include/fts.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ typedef struct _ftsent {
FTS *fts_fts; /* back pointer to main FTS */
} FTSENT;

#include <sys/cdefs.h>
#ifdef __cplusplus
extern "C" {
#endif

__BEGIN_DECLS
FTSENT *fts_children(FTS *, int);
int fts_close(FTS *);
void *fts_get_clientptr(FTS *);
Expand All @@ -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 <fts.h>
Expand Down

0 comments on commit edbe64d

Please sign in to comment.