diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/sys/select.h | 11 | ||||
-rw-r--r-- | misc/syslog.c | 7 |
2 files changed, 11 insertions, 7 deletions
diff --git a/misc/sys/select.h b/misc/sys/select.h index ece1916..320df02 100644 --- a/misc/sys/select.h +++ b/misc/sys/select.h @@ -28,14 +28,17 @@ Boston, MA 02111-1307, USA. */ #include <gnu/types.h> /* Get definition of timer specification structures. */ -/* XXX this is wrong. 1003.1gD6.1 says `struct timespec' - is defined by <sys/select.h>, and that is all. - However, since a program is required to include <sys/time.h> - before using select/pselect anyway, perhaps it doesn't matter. */ +#define __need_timespec #include <sys/time.h> __BEGIN_DECLS +/* This declaration puts `struct timeval' in global scope even if + <sys/time.h> has not been included to define it. That way the + `select' prototype below will not conflict with a later definition + of `struct timeval'. */ +struct timeval; + /* Representation of a set of file descriptors. */ #define fd_set __fd_set diff --git a/misc/syslog.c b/misc/syslog.c index 068a89e..bcac6c7 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -163,7 +163,7 @@ vsyslog(pri, fmt, ap) /* Get connected, output the message to the local logger. */ if (!connected) openlog(LogTag, LogStat | LOG_NDELAY, 0); - if (send(LogFile, buf, bufsize, 0) < 0) + if (__send(LogFile, buf, bufsize, 0) < 0) { /* * Output the message to the console; don't worry about blocking, @@ -205,11 +205,12 @@ openlog(ident, logstat, logfac) } } if (LogFile != -1 && !connected) - if (connect(LogFile, &SyslogAddr, sizeof(SyslogAddr)) == -1) { + if (__connect(LogFile, &SyslogAddr, sizeof(SyslogAddr)) == -1) + { (void)close(LogFile); LogFile = -1; } else - connected = 1; + connected = 1; } void |