Permalink
Browse files

Function name collision makes pkg-static fails.

Rename sha256_file to hash_file().
  • Loading branch information...
1 parent 2e23a57 commit e675243e929e3d06b9e3fee44dfa598ac376fc0b @jlaffaye jlaffaye committed Nov 18, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 pkg/clean.c
  2. +1 −1 pkg/pkgcli.h
  3. +1 −1 pkg/utils.c
View
2 pkg/clean.c
@@ -315,7 +315,7 @@ exec_clean(int argc, char **argv)
pkg_get(p, PKG_CKSUM, &cksum);
- if (sha256_file(ent->fts_path, local_cksum) == EPKG_OK) {
+ if (hash_file(ent->fts_path, local_cksum) == EPKG_OK) {
if (strcmp(cksum, local_cksum) != 0) {
ret = add_to_dellist(&dl, CKSUM_MISMATCH, ent->fts_path,
View
2 pkg/pkgcli.h
@@ -218,7 +218,7 @@ char *absolutepath(const char *src, char *dest, size_t dest_len);
void print_jobs_summary(struct pkg_jobs *j, pkg_jobs_t type,
const char *msg, ...);
struct sbuf *exec_buf(const char *cmd);
-int sha256_file(const char *, char[SHA256_DIGEST_LENGTH * 2 +1]);
+int hash_file(const char *, char[SHA256_DIGEST_LENGTH * 2 +1]);
int event_callback(void *data, struct pkg_event *ev);
View
2 pkg/utils.c
@@ -691,7 +691,7 @@ exec_buf(const char *cmd) {
}
int
-sha256_file(const char *path, char out[SHA256_DIGEST_LENGTH * 2 + 1])
+hash_file(const char *path, char out[SHA256_DIGEST_LENGTH * 2 + 1])
{
FILE *fp;
char buffer[BUFSIZ];

0 comments on commit e675243

Please sign in to comment.