From b952a3b08c778e1505032b55476e8956c38aead8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 16 Aug 2011 19:51:21 -0500 Subject: Fix compilation using --without-gpgme This function is used regardless of whether gpgme support is enabled, so make sure it is always accessible. Signed-off-by: Dan McGee --- lib/libalpm/signing.c | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'lib/libalpm/signing.c') diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c index cdbdc31a..28ce6209 100644 --- a/lib/libalpm/signing.c +++ b/lib/libalpm/signing.c @@ -186,28 +186,6 @@ error: return 1; } - -/** - * Form a signature path given a file path. - * Caller must free the result. - * @param handle the context handle - * @param path the full path to a file - * @return the path with '.sig' appended, NULL on errors - */ -char *_alpm_sigpath(alpm_handle_t *handle, const char *path) -{ - char *sigpath; - size_t len; - - if(!path) { - return NULL; - } - len = strlen(path) + 5; - CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, NULL)); - sprintf(sigpath, "%s.sig", path); - return sigpath; -} - /** * Check the PGP signature for the given file path. * If base64_sig is provided, it will be used as the signature data after @@ -437,6 +415,27 @@ int _alpm_gpgme_checksig(alpm_handle_t UNUSED *handle, const char UNUSED *path, } #endif +/** + * Form a signature path given a file path. + * Caller must free the result. + * @param handle the context handle + * @param path the full path to a file + * @return the path with '.sig' appended, NULL on errors + */ +char *_alpm_sigpath(alpm_handle_t *handle, const char *path) +{ + char *sigpath; + size_t len; + + if(!path) { + return NULL; + } + len = strlen(path) + 5; + CALLOC(sigpath, len, sizeof(char), RET_ERR(handle, ALPM_ERR_MEMORY, NULL)); + sprintf(sigpath, "%s.sig", path); + return sigpath; +} + int _alpm_check_pgp_helper(alpm_handle_t *handle, const char *path, const char *base64_sig, int optional, int marginal, int unknown, enum _alpm_errno_t invalid_err) -- cgit v1.2.3-24-g4f1b