summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/support/utf8_conv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util/support/utf8_conv.c b/src/util/support/utf8_conv.c
index a8c9267ef..185dc4ba7 100644
--- a/src/util/support/utf8_conv.c
+++ b/src/util/support/utf8_conv.c
@@ -103,6 +103,9 @@ k5_utf8s_to_ucs2s(krb5_ucs2 *ucs2str,
if (ucs2str != NULL) {
#ifdef K5_BE
+#ifndef SWAP16
+#define SWAP16(X) ((((X) << 8) | ((X) >> 8)) & 0xFFFF)
+#endif
if (little_endian)
ucs2str[ucs2len] = SWAP16(ch);
else