From d17d6d4286c18626c357d748df6fa9ab66aa2714 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 20 Mar 2001 19:27:56 +0000 Subject: * libc/include/sys/types.h (BSD int typedefs): Guard with _BSDTYPES_DEFINED rather than _WINSOCK_H. (fd_set): Add !defined __USE_W32_SOCKETS to guard; define _SYS_TYPES_FD_SET. * libc/include/sys/unistd.h (gethostname): Don't declare if defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS). --- newlib/libc/include/sys/unistd.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'newlib/libc/include/sys/unistd.h') diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 2da98790b..0fad0dccf 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -115,7 +115,10 @@ int _EXFUN(setdtablesize, (int)); unsigned _EXFUN(usleep, (unsigned int __useconds)); int _EXFUN(ftruncate, (int __fd, off_t __length)); int _EXFUN(truncate, (const char *, off_t __length)); -int _EXFUN(gethostname, (char *__name, size_t __len)); +#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS)) +/* winsock[2].h defines as __stdcall, and with int as 2nd arg */ + int _EXFUN(gethostname, (char *__name, size_t __len)); +#endif char * _EXFUN(mktemp, (char *)); int _EXFUN(sync, (void)); int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen)); -- cgit v1.2.3