summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Sanders <brecht@sanders.org>2023-02-03 08:44:49 +0100
committerBjörn Esser <besser82@fedoraproject.org>2023-06-06 18:50:37 +0200
commita507b628a5a5d4e4f1cf0f0a9a72967470ee7624 (patch)
tree47cee3dbfcdd3385b347bfaa6ce7121222977d7a
parentce562f4d33dc090fcd8f6ea1af3ba32cdc2b3c9c (diff)
downloadlibxcrypt-a507b628a5a5d4e4f1cf0f0a9a72967470ee7624.tar.gz
libxcrypt-a507b628a5a5d4e4f1cf0f0a9a72967470ee7624.tar.bz2
libxcrypt-a507b628a5a5d4e4f1cf0f0a9a72967470ee7624.zip
Fix for compilation on Windows
This fix allows the library to build on Windows (at least with MinGW-w64). `.symver` is only supported for ELF format but Windows uses COFF/PE. Workaround dummy define of `symver_set()`
-rw-r--r--lib/crypt-port.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/crypt-port.h b/lib/crypt-port.h
index f06ca24..a707939 100644
--- a/lib/crypt-port.h
+++ b/lib/crypt-port.h
@@ -201,6 +201,11 @@ extern size_t strcpy_or_abort (void *dst, size_t d_size, const void *src);
__asm__(".globl _" extstr); \
__asm__(".set _" extstr ", _" #intname)
+#elif defined _WIN32
+
+/* .symver is only supported for ELF format, Windows uses COFF/PE */
+# define symver_set(extstr, intname, version, mode)
+
#elif defined __GNUC__ && __GNUC__ >= 3
# define _strong_alias(name, aliasname) \