diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2014-01-08 10:52:29 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-01-08 10:52:29 +0100 |
commit | 4b3363ecf2a96ab07426aa0834d8c666634b37ff (patch) | |
tree | c1900362e864ad4307129f2109cc871007b69778 /include/libssh | |
parent | 6fe51b13fb8f1da1d2420f73c1a97124f3d263ab (diff) | |
download | libssh-4b3363ecf2a96ab07426aa0834d8c666634b37ff.tar.gz libssh-4b3363ecf2a96ab07426aa0834d8c666634b37ff.tar.xz libssh-4b3363ecf2a96ab07426aa0834d8c666634b37ff.zip |
include: Fix building if we do not have asm volatile.
Diffstat (limited to 'include/libssh')
-rw-r--r-- | include/libssh/priv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index d8176d90..abf93ef7 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -267,6 +267,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))); \ @@ -275,7 +276,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 */ |