summaryrefslogtreecommitdiffstats
path: root/include/libssh/priv.h
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-04-02 13:41:02 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-04-02 13:42:12 +0200
commitdc30183d8aa9f06c2dc9375a882d16e87dbd4272 (patch)
tree84cbdd0fe7492c0a53a25d3129d263578747629e /include/libssh/priv.h
parent396f5e21103490fc2eae5509cf9afc723ae85842 (diff)
cmake: Detect __func__ and __FUNCTION__ during configure step
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include/libssh/priv.h')
-rw-r--r--include/libssh/priv.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 1184ab4a..4cbab95e 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)