summaryrefslogtreecommitdiffstats
path: root/libtomcrypt/headers
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/headers')
-rw-r--r--libtomcrypt/headers/tomcrypt.h1
-rw-r--r--libtomcrypt/headers/tomcrypt_cfg.h4
-rw-r--r--libtomcrypt/headers/tomcrypt_custom.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/libtomcrypt/headers/tomcrypt.h b/libtomcrypt/headers/tomcrypt.h
index fdb6c8d1f16..a9c675d0944 100644
--- a/libtomcrypt/headers/tomcrypt.h
+++ b/libtomcrypt/headers/tomcrypt.h
@@ -6,6 +6,7 @@
#include <linux/string.h>
#include <linux/ctype.h>
#include <linux/nls.h>
+#include <linux/sort.h>
/* use configuration data */
#include <tomcrypt_custom.h>
diff --git a/libtomcrypt/headers/tomcrypt_cfg.h b/libtomcrypt/headers/tomcrypt_cfg.h
index 8ad90bce4b0..93db10e6729 100644
--- a/libtomcrypt/headers/tomcrypt_cfg.h
+++ b/libtomcrypt/headers/tomcrypt_cfg.h
@@ -19,11 +19,11 @@
#define LTC_EXPORT
#endif
-LTC_EXPORT void LTC_CALL XQSORT(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));
-
/* certain platforms use macros for these, making the prototypes broken */
#ifndef LTC_NO_PROTOTYPES
+LTC_EXPORT void LTC_CALL XQSORT(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));
+
/* you can change how memory allocation works ... */
LTC_EXPORT void * LTC_CALL XMALLOC(size_t n);
LTC_EXPORT void * LTC_CALL XREALLOC(void *p, size_t n);
diff --git a/libtomcrypt/headers/tomcrypt_custom.h b/libtomcrypt/headers/tomcrypt_custom.h
index c537dc7605a..76b574487bc 100644
--- a/libtomcrypt/headers/tomcrypt_custom.h
+++ b/libtomcrypt/headers/tomcrypt_custom.h
@@ -65,7 +65,7 @@
#ifdef qsort
#define LTC_NO_PROTOTYPES
#endif
-#define XQSORT qsort
+#define XQSORT(x,y,z,w) sort(x,y,z,w,NULL)
#endif
/* Easy button? */