From: David McCreedy Date: Mon, 23 Dec 2002 17:27:46 +0000 (+0000) Subject: TPF-specific patch to skip fcntl() on sockets. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d60f6dba32b12c8bac0844e8b80e8b3ccd35c1a7;p=thirdparty%2Fapache%2Fhttpd.git TPF-specific patch to skip fcntl() on sockets. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@98099 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/alloc.c b/src/main/alloc.c index ed7f035d987..61a432c33eb 100644 --- a/src/main/alloc.c +++ b/src/main/alloc.c @@ -2103,6 +2103,9 @@ static int socket_magic_cleanup(void *fpv) API_EXPORT(void) ap_note_cleanups_for_socket_ex(pool *p, int fd, int domagic) { +#ifdef TPF + domagic = 0; /* skip magic (fcntl) for TPF sockets, at least for now */ +#endif ap_register_cleanup_ex(p, (void *) (long) fd, socket_cleanup, socket_cleanup, domagic ? socket_magic_cleanup : NULL); diff --git a/src/main/util_uri.c b/src/main/util_uri.c index 802790aa829..38930e236f2 100644 --- a/src/main/util_uri.c +++ b/src/main/util_uri.c @@ -163,7 +163,12 @@ API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp) */ API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname) { +#ifdef TPF + /* get rid of compilation warning on TPF */ + struct hostent *hp = gethostbyname((char *)hostname); +#else struct hostent *hp = gethostbyname(hostname); +#endif return (hp == NULL) ? NULL : ap_pduphostent(p, hp); }