From 7d455417201a0c368cd39afce5cd98130adc2aca Mon Sep 17 00:00:00 2001 From: schwarz Date: Mon, 10 Apr 2006 13:26:15 +0000 Subject: corrected a typo in libnetbsd/usleep.c which probably surfaces only on some older OSes added a hack to support IRIX 5 (modifications done directly to the files instead of adding patch files to make them being used during bootstrapping as well; approved by reed) --- net/tnftp/files/libnetbsd/usleep.c | 2 +- net/tnftp/files/tnftp.h | 8 ++++++++ net/tnftp/hacks.mk | 10 ++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 net/tnftp/hacks.mk diff --git a/net/tnftp/files/libnetbsd/usleep.c b/net/tnftp/files/libnetbsd/usleep.c index f729e2d0506..233485a0616 100644 --- a/net/tnftp/files/libnetbsd/usleep.c +++ b/net/tnftp/files/libnetbsd/usleep.c @@ -42,7 +42,7 @@ int usleep(unsigned int usec) { #if HAVE_POLL - return (poll(NULL, 0, usec / 1000); + return (poll(NULL, 0, usec / 1000)); #elif HAVE_SELECT struct timeval tv; diff --git a/net/tnftp/files/tnftp.h b/net/tnftp/files/tnftp.h index 22df1cfd48d..3ddcd9da7e0 100644 --- a/net/tnftp/files/tnftp.h +++ b/net/tnftp/files/tnftp.h @@ -179,8 +179,16 @@ typedef unsigned short sa_family_t; #endif #if ! HAVE_SOCKLEN_T +#ifdef __sgi +typedef int socklen_t; +#else typedef unsigned int socklen_t; #endif +#endif + +#ifdef UINT32_T /* needed for example on IRIX 5 */ +typedef unsigned UINT32_T uint32_t; +#endif #if HAVE_AF_INET6 && HAVE_SOCKADDR_IN6 && HAVE_NS_IN6ADDRSZ # define INET6 diff --git a/net/tnftp/hacks.mk b/net/tnftp/hacks.mk new file mode 100644 index 00000000000..3a3c0ad99a5 --- /dev/null +++ b/net/tnftp/hacks.mk @@ -0,0 +1,10 @@ +# $NetBSD: hacks.mk,v 1.1 2006/04/10 13:26:15 schwarz Exp $ + +### [ Mon Apr 10 14:23:26 CDT 2006 : schwarz ] +### Define type to use for uint32_t on platforms that do not have it +### (cf. tnftp.h) +### +.if !empty(LOWER_OPSYS:Mirix5*) +PKG_HACKS+= uint32_t +CPPFLAGS+= -DUINT32_T=int +.endif -- cgit v1.2.3