summaryrefslogtreecommitdiff
path: root/kms++util
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-10 20:44:26 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-10 20:44:26 +0300
commitbd5f6471e619a6ba2987bc7f66ef78a531f94d6c (patch)
treea2f73163ba7d5a859d902e2d7f3946d9ac2dc3be /kms++util
parentc817d3315193b0c8067f45d7bb5375aea4279919 (diff)
parent35373b7829fdc49407f4c256c603a137b957a1ad (diff)
Merge branch 'yem/musl' of git://github.com/yann-morin-1998/kmsxx
Diffstat (limited to 'kms++util')
-rw-r--r--kms++util/inc/kms++util/kms++util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/kms++util/inc/kms++util/kms++util.h b/kms++util/inc/kms++util/kms++util.h
index 10a1f0a..5a688f6 100644
--- a/kms++util/inc/kms++util/kms++util.h
+++ b/kms++util/inc/kms++util/kms++util.h
@@ -35,6 +35,13 @@ Connector* resolve_connector(Card& card, const std::string& str);
#define unlikely(x) __builtin_expect(!!(x), 0)
+/* __STRING(x) is a glibcism (i.e. not standard), which happens to also
+ * be available in uClibc. However, musl does not define it. Do it here.
+ */
+#ifndef __STRING
+#define __STRING(x) #x
+#endif
+
#define ASSERT(x) \
if (unlikely(!(x))) { \
fprintf(stderr, "%s:%d: %s: ASSERT(%s) failed\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, __STRING(x)); \