From dff5bb53a02e032a0a3e49fbe78f066fb8be02fe Mon Sep 17 00:00:00 2001 From: Schafwolle <8407328+Schafwolle@users.noreply.github.com> Date: Sun, 2 Jan 2022 18:47:57 +0100 Subject: [PATCH] support usage of headers within C++ added missing extern "C" to support usage of the header within C++ --- ftpd.h | 9 +++++++++ vfs.h | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ftpd.h b/ftpd.h index b5419d3..34f55ad 100644 --- a/ftpd.h +++ b/ftpd.h @@ -34,6 +34,15 @@ #ifndef __FTPD_H__ #define __FTPD_H__ +#ifdef __cplusplus +extern "C" +{ +#endif + void ftpd_init(void); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* __FTPD_H__ */ diff --git a/vfs.h b/vfs.h index 5e7c552..2290fdc 100644 --- a/vfs.h +++ b/vfs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, Philipp Tölke +/* Copyright (c) 2013, Philipp T�lke * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,6 +27,11 @@ #ifndef INCLUDE_VFS_H #define INCLUDE_VFS_H +#ifdef __cplusplus +extern "C" +{ +#endif + #include #include #include @@ -86,4 +91,8 @@ void vfs_closedir(vfs_dir_t* dir); vfs_dir_t* vfs_opendir(vfs_t* vfs, const char* path); struct tm* gmtime(const time_t *c_t); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* INCLUDE_VFS_H */