Add external c declaration for c++

To make sure c++ name mangling works correctly c code should be noted "extern"

Signed-off-by: Norbert Pocs <npocs@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Norbert Pocs
2022-10-24 12:50:46 +02:00
committed by Jakub Jelen
parent 5e81eec4ec
commit d1947b55ec
42 changed files with 335 additions and 0 deletions

View File

@@ -21,6 +21,10 @@
#ifndef MISC_H_
#define MISC_H_
#ifdef __cplusplus
extern "C" {
#endif
/* in misc.c */
/* gets the user home dir. */
char *ssh_get_user_home_dir(void);
@@ -99,4 +103,8 @@ int ssh_newline_vis(const char *string, char *buf, size_t buf_len);
int ssh_tmpname(char *template);
char *ssh_strreplace(const char *src, const char *pattern, const char *repl);
#ifdef __cplusplus
}
#endif
#endif /* MISC_H_ */