diff options
author | Tim Kientzle <kientzle@acm.org> | 2016-04-24 15:16:10 -0700 |
---|---|---|
committer | Tim Kientzle <kientzle@acm.org> | 2016-04-24 15:16:10 -0700 |
commit | 11855358b842491568afd3e37203e4879c351c47 (patch) | |
tree | a747570127bdfac901a1ca835435ec60fd1ee6e1 /libarchive/archive_cryptor_private.h | |
parent | 2f637b08f8d2622b132050c34223c8b0f668eb21 (diff) | |
download | libarchive-11855358b842491568afd3e37203e4879c351c47.tar.gz |
Ensure that cryptor, hmac, and xxhash always define at least one symbol. This prevents headaches with compilers and linkers that choke on empty object files.
Diffstat (limited to 'libarchive/archive_cryptor_private.h')
-rw-r--r-- | libarchive/archive_cryptor_private.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libarchive/archive_cryptor_private.h b/libarchive/archive_cryptor_private.h index f629bc13..37eaad36 100644 --- a/libarchive/archive_cryptor_private.h +++ b/libarchive/archive_cryptor_private.h @@ -30,6 +30,17 @@ #ifndef ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED #define ARCHIVE_CRYPTOR_PRIVATE_H_INCLUDED +/* + * On systems that do not support any recognized crypto libraries, + * the archive_cryptor.c file will normally define no usable symbols. + * + * But some compilers and linkers choke on empty object files, so + * define a public symbol that will always exist. This could + * be removed someday if this file gains another always-present + * symbol definition. + */ +int __libarchive_cryptor_build_hack(void); + #ifdef __APPLE__ # include <AvailabilityMacros.h> # if MAC_OS_X_VERSION_MAX_ALLOWED >= 1080 |