summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libssh/pki_priv.h2
-rw-r--r--include/libssh/priv.h8
2 files changed, 7 insertions, 3 deletions
diff --git a/include/libssh/pki_priv.h b/include/libssh/pki_priv.h
index 3a91622c..213e147a 100644
--- a/include/libssh/pki_priv.h
+++ b/include/libssh/pki_priv.h
@@ -38,7 +38,7 @@ int bcrypt_pbkdf(const char *pass, size_t passlen, const u_int8_t *salt,
#define OPENSSH_AUTH_MAGIC "openssh-key-v1"
#define ssh_pki_log(...) \
- _ssh_pki_log(__FUNCTION__, __VA_ARGS__)
+ _ssh_log(SSH_LOG_FUNCTIONS, __func__, __VA_ARGS__)
void _ssh_pki_log(const char *function,
const char *format, ...) PRINTF_ATTRIBUTE(2, 3);
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 697b45bf..e8b50ba0 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -139,8 +139,12 @@ int gettimeofday(struct timeval *__p, void *__t);
#define MAX_BUF_SIZE 4096
#endif
-#ifndef __func__
-#define __func__ __FUNCTION__
+#ifndef HAVE_COMPILER__FUNC__
+# ifdef HAVE_COMPILER__FUNCTION__
+# define __func__ __FUNCTION__
+# else
+# error "Your system must provide a __func__ macro"
+# endif
#endif
#if defined(HAVE_GCC_THREAD_LOCAL_STORAGE)