Commit aa5a92d1 by Chris Young

OS4 compatibility

parent 51975727
......@@ -107,6 +107,8 @@ GIT_EXTERN(int) git_strarray_copy(git_strarray *tgt, const git_strarray *src);
*/
GIT_EXTERN(void) git_libgit2_version(int *major, int *minor, int *rev);
GIT_EXTERN(int) p_fnmatch(const char *pattern, const char *string, int flags);
/** @} */
GIT_END_DECL
#endif
......@@ -512,7 +512,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))
......@@ -570,7 +570,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;
......
......@@ -74,6 +74,10 @@ typedef SOCKET GIT_SOCKET;
# include "unix/posix.h"
#endif
#define p_readdir_r(d,e,r) readdir_r(d,e,r)
#ifndef __amigaos4__
#define p_readdir_r(d,e,r) readdir_r(d,e,&r)
#else
#define p_readdir_r(d,e,r) r = readdir(d)
#endif
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment