-
Notifications
You must be signed in to change notification settings - Fork 2.5k
AmigaOS 4 compatibility patches #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -486,9 +486,14 @@ int git_path_cmp( | |||
/* Taken from git.git */ | |||
GIT_INLINE(int) is_dot_or_dotdot(const char *name) | |||
{ | |||
#ifdef __amigaos4__ | |||
/* This is irrelevant on AmigaOS */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if this is irrelevant, is there a need to #ifdef it out or can we just leave it? I don't think git is going to let you add a file named "." or ".." so having those files show up in direach()
or dirload()
call is just going to cause issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to remove that #ifdef... absolutely, it doesn't need to be there.
struct addrinfo *info = NULL, *p; | ||
#else | ||
int p; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following... You've defined struct addrinfo
before, why don't you use it here?
Looks good, besides all the conditional network compilation. We need to drop that; you've already defined the |
I've dropped the conditional network stuff and implemented my own replacement getaddrinfo() functions. This means there is now one block at the top of the file for NO_ADDRINFO and the rest unchanged. |
✨ MERGED ✨ Can you verify that this still runs under AmigaOS after the cleanup? |
There's an include missing. Other than that, working perfectly, thanks. diff --git a/src/posix.h b/src/posix.h
index 76f3b94..8aac0cc 100644
--- a/src/posix.h
+++ b/src/posix.h
@@ -96,6 +96,8 @@ GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, s
#endif
#ifdef NO_ADDRINFO
+#include <netdb.h>
+
struct addrinfo {
struct hostent *ai_hostent;
struct servent *ai_servent; |
Fixed! |
This patch enables libgit2 to be compiled and used on AmigaOS 4.