sunos: fix !defined(PORT_SOURCE_FILE) build
This commit is contained in:
parent
3164f1ea69
commit
69ab328d9f
@ -25,12 +25,16 @@
|
||||
#include <sys/port.h>
|
||||
#include <port.h>
|
||||
|
||||
#if defined(PORT_SOURCE_FILE)
|
||||
|
||||
# define UV_PLATFORM_LOOP_FIELDS \
|
||||
/* For the sake of convenience and reduced #ifdef-ery in src/unix/sunos.c,
|
||||
* add the fs_event fields even when this version of SunOS doesn't support
|
||||
* file watching.
|
||||
*/
|
||||
#define UV_PLATFORM_LOOP_FIELDS \
|
||||
uv__io_t fs_event_watcher; \
|
||||
int fs_fd; \
|
||||
|
||||
#if defined(PORT_SOURCE_FILE)
|
||||
|
||||
# define UV_PLATFORM_FS_EVENT_FIELDS \
|
||||
file_obj_t fo; \
|
||||
int fd; \
|
||||
|
||||
@ -31,8 +31,6 @@
|
||||
# define inline __inline
|
||||
#endif
|
||||
|
||||
#undef HAVE_PORTS_FS
|
||||
|
||||
#if __linux__
|
||||
# include "linux/syscalls.h"
|
||||
#endif /* __linux__ */
|
||||
@ -40,9 +38,6 @@
|
||||
#if defined(__sun)
|
||||
# include <sys/port.h>
|
||||
# include <port.h>
|
||||
# ifdef PORT_SOURCE_FILE
|
||||
# define HAVE_PORTS_FS 1
|
||||
# endif
|
||||
# define futimes(fd, tv) futimesat(fd, (void*)0, tv)
|
||||
#endif /* __sun */
|
||||
|
||||
|
||||
@ -39,15 +39,13 @@
|
||||
#include <kstat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if HAVE_PORTS_FS
|
||||
# include <sys/port.h>
|
||||
# include <port.h>
|
||||
#include <sys/port.h>
|
||||
#include <port.h>
|
||||
|
||||
# define PORT_FIRED 0x69
|
||||
# define PORT_UNUSED 0x0
|
||||
# define PORT_LOADED 0x99
|
||||
# define PORT_DELETED -1
|
||||
#endif
|
||||
#define PORT_FIRED 0x69
|
||||
#define PORT_UNUSED 0x0
|
||||
#define PORT_LOADED 0x99
|
||||
#define PORT_DELETED -1
|
||||
|
||||
#if (!defined(_LP64)) && (_FILE_OFFSET_BITS - 0 == 64)
|
||||
#define PROCFS_FILE_OFFSET_BITS_HACK 1
|
||||
@ -272,7 +270,8 @@ void uv_loadavg(double avg[3]) {
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_PORTS_FS
|
||||
#if defined(PORT_SOURCE_FILE)
|
||||
|
||||
static void uv__fs_event_rearm(uv_fs_event_t *handle) {
|
||||
if (handle->fd == -1)
|
||||
return;
|
||||
@ -386,7 +385,7 @@ void uv__fs_event_close(uv_fs_event_t* handle) {
|
||||
uv__handle_stop(handle);
|
||||
}
|
||||
|
||||
#else /* !HAVE_PORTS_FS */
|
||||
#else /* !defined(PORT_SOURCE_FILE) */
|
||||
|
||||
int uv_fs_event_init(uv_loop_t* loop,
|
||||
uv_fs_event_t* handle,
|
||||
@ -402,7 +401,7 @@ void uv__fs_event_close(uv_fs_event_t* handle) {
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
#endif /* HAVE_PORTS_FS */
|
||||
#endif /* defined(PORT_SOURCE_FILE) */
|
||||
|
||||
|
||||
char** uv_setup_args(int argc, char** argv) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user