aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-01-08 10:52:29 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-01-08 10:52:57 +0100
commit0e5510bb999c125cbdd0fdb9ad1fe4def9c2ecd5 (patch)
tree8be8be6705c8953c729d69b644a5d944906e9bed
parentde464cb74eb2382c611528d8852181de661c2883 (diff)
downloadlibssh-0e5510bb999c125cbdd0fdb9ad1fe4def9c2ecd5.tar.gz
libssh-0e5510bb999c125cbdd0fdb9ad1fe4def9c2ecd5.tar.xz
libssh-0e5510bb999c125cbdd0fdb9ad1fe4def9c2ecd5.zip
include: Fix building if we do not have asm volatile.
-rw-r--r--include/libssh/priv.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h
index 020e314c..b7c71065 100644
--- a/include/libssh/priv.h
+++ b/include/libssh/priv.h
@@ -266,6 +266,7 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
memset((x), '\0', (size)); __asm__ volatile("" : : "r"(&(x)) : "memory"); \
} while(0)
#else /* HAVE_GCC_VOLATILE_MEMORY_PROTECTION */
+#warning "We do not have asn volatile memory protection"
/** Overwrite a string with '\0' */
# define BURN_STRING(x) do { \
if ((x) != NULL) memset((x), '\0', strlen((x))); \
@@ -274,7 +275,7 @@ int match_hostname(const char *host, const char *pattern, unsigned int len);
/** Overwrite the buffer with '\0' */
# define BURN_BUFFER(x, size) do { \
if ((x) != NULL) \
- memset((x), '\0', (size)); __asm__ volatile("" : : "r"(&(x)) : "memory"); \
+ memset((x), '\0', (size)); \
} while(0)
#endif /* HAVE_GCC_VOLATILE_MEMORY_PROTECTION */