diff --git a/README.amiga b/README.amiga deleted file mode 100755 index 97414dda2..000000000 --- a/README.amiga +++ /dev/null @@ -1,4 +0,0 @@ -Nasty build hack: -When setting SHA1 to ppc in CMakeLists.txt, after running initial CMake, -copy src/ppc/sha1ppc.S.obj to build/CMakeFiles/git2.dir/src/ppc/ -Add CMakeFiles/git2.dir/src/ppc/sha1ppc.S.obj to the list in build/CMakeFiles/git2.dir/link.txt diff --git a/src/amiga/map.c b/src/amiga/map.c index 643e6c65d..2fb065c8b 100755 --- a/src/amiga/map.c +++ b/src/amiga/map.c @@ -14,9 +14,6 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offset) { - int mprot = 0; - int mflag = 0; - GIT_MMAP_VALIDATE(out, len, prot, flags); out->data = NULL; @@ -27,12 +24,12 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs return -1; } - if(out->data = malloc(len)) { + if((out->data = malloc(len))) { p_lseek(fd, offset, SEEK_SET); p_read(fd, out->data, len); } - if (!out->data || out->data == MAP_FAILED) { + if (!out->data || (out->data == MAP_FAILED)) { giterr_set(GITERR_OS, "Failed to mmap. Could not write data"); return -1; } diff --git a/src/netops.c b/src/netops.c index 166c97162..98b5035ff 100644 --- a/src/netops.c +++ b/src/netops.c @@ -430,7 +430,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) #else memcpy(&hints.ai_addr.sin_addr, hints.ai_hostent->h_addr_list[p], hints.ai_hostent->h_length); hints.ai_addr.sin_family = hints.ai_hostent->h_addrtype; - hints.ai_addr.sin_port = honts.ai_port; + hints.ai_addr.sin_port = hints.ai_port; if (connect(s, (struct sockaddr *)&hints.ai_addr, sizeof(struct sockaddr_in)) == 0) #endif break; diff --git a/src/path.c b/src/path.c index bd659f815..1d85559a9 100644 --- a/src/path.c +++ b/src/path.c @@ -516,7 +516,7 @@ int git_path_direach( de_buf = git__malloc(sizeof(struct dirent)); #endif - while (p_readdir_r(dir, de_buf, de) == 0 && de != NULL) { + while (p_readdir_r(dir, de_buf, &de) == 0 && de != NULL) { int result; if (is_dot_or_dotdot(de->d_name)) @@ -574,7 +574,7 @@ int git_path_dirload( path_len -= prefix_len; need_slash = (path_len > 0 && path[path_len-1] != '/') ? 1 : 0; - while ((error = p_readdir_r(dir, de_buf, de)) == 0 && de != NULL) { + while ((error = p_readdir_r(dir, de_buf, &de)) == 0 && de != NULL) { char *entry_path; size_t entry_len; diff --git a/src/posix.h b/src/posix.h index cc35c52e3..d423b7e07 100644 --- a/src/posix.h +++ b/src/posix.h @@ -84,9 +84,10 @@ extern int p_gettimeofday(struct timeval *tv, struct timezone *tz); #endif #ifndef NO_READDIR_R -#define p_readdir_r(d,e,r) readdir_r(d,e,&r) +#define p_readdir_r(d,e,r) readdir_r(d,e,r) #else -GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct direct **result) +#include +GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) { GIT_UNUSED(entry); *result = readdir(dirp); diff --git a/src/ppc/sha1ppc.S.obj b/src/ppc/sha1ppc.S.obj deleted file mode 100644 index a7dad600f..000000000 Binary files a/src/ppc/sha1ppc.S.obj and /dev/null differ