include: Fix building if we do not have asm volatile.

This commit is contained in:
Andreas Schneider
2014-01-08 10:52:29 +01:00
parent 6fe51b13fb
commit 4b3363ecf2

View File

@@ -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 */