diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-06-13 23:16:14 +0100 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2012-06-13 23:16:14 +0100 |
commit | 96ef3d84629ef72fb662d95abbab3de634921678 (patch) | |
tree | 1859c8ce4b577acce3c5561d7f749f5a23574d58 /src/netops.c | |
parent | 2aeadb9c78df4b463ffb3293e242e19a7e0d17a9 (diff) | |
download | libgit2-96ef3d84629ef72fb662d95abbab3de634921678.tar.gz |
Make this more generic and mergeable.
Needs AmigaOS.cmake now from CMake package at OS4Depot, or contents below:
--8<--
SET(AMIGA 1)
SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
--8<--
Diffstat (limited to 'src/netops.c')
-rw-r--r-- | src/netops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/netops.c b/src/netops.c index 6808c8ee7..11295c5cd 100644 --- a/src/netops.c +++ b/src/netops.c @@ -376,7 +376,7 @@ static int ssl_setup(git_transport *t, const char *host) int gitno_connect(git_transport *t, const char *host, const char *port) { -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO struct addrinfo *info = NULL, *p; struct addrinfo hints; #else @@ -388,7 +388,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) #endif int ret; GIT_SOCKET s = INVALID_SOCKET; -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO memset(&hints, 0x0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; @@ -407,7 +407,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) port_num = atol(port); #endif -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO for (p = info; p != NULL; p = p->ai_next) { s = socket(p->ai_family, p->ai_socktype, p->ai_protocol); #else @@ -418,7 +418,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) net_set_error("error creating socket"); break; } -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO if (connect(s, p->ai_addr, (socklen_t)p->ai_addrlen) == 0) #else memcpy(&saddr.sin_addr, hent->h_addr_list[p], hent->h_length); @@ -435,7 +435,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) /* Oops, we couldn't connect to any address */ if (s == INVALID_SOCKET && -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO p == NULL) { #else hent->h_addr_list[p] == NULL) { @@ -445,7 +445,7 @@ int gitno_connect(git_transport *t, const char *host, const char *port) } t->socket = s; -#ifndef __amigaos4__ +#ifndef NO_ADDRINFO freeaddrinfo(info); #endif if (t->encrypt && ssl_setup(t, host) < 0) |