From 8287551b91f7520cef93339c650e65ea89556939 Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Thu, 7 Jul 2011 23:25:29 -0700 Subject: [PATCH] Fix SunOS build --- include/ev.h | 2 +- src/uv-sunos.c | 3 +-- src/uv-unix.c | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/ev.h b/include/ev.h index 74f27a1c..526b9f1b 100644 --- a/include/ev.h +++ b/include/ev.h @@ -219,7 +219,7 @@ enum { EV_CLEANUP = 0x00040000, /* event loop resumed in child */ EV_ASYNC = 0x00080000, /* async intra-loop signal */ EV_CUSTOM = 0x01000000, /* for use by user code */ - EV_ERROR = -2147483648 /* sent when an error occurs */ + EV_ERROR = (-2147483647 - 1) /* sent when an error occurs */ }; /* can be used to add custom fields to all watchers, while losing binary compatibility */ diff --git a/src/uv-sunos.c b/src/uv-sunos.c index 879956f4..4a754614 100644 --- a/src/uv-sunos.c +++ b/src/uv-sunos.c @@ -20,7 +20,6 @@ #include "uv.h" -#include #include #include #include @@ -40,7 +39,7 @@ uint64_t uv_hrtime() { int uv_exepath(char* buffer, size_t* size) { size_t res; pid_t pid; - char buf[PATH_MAX]; + char buf[128]; if (buffer == NULL) return (-1); diff --git a/src/uv-unix.c b/src/uv-unix.c index 94944bab..e29c842b 100644 --- a/src/uv-unix.c +++ b/src/uv-unix.c @@ -99,7 +99,6 @@ static void uv_fatal_error(const int errorno, const char* syscall) { fprintf(stderr, "\nlibuv fatal error. (%d) %s\n", errorno, errmsg); } - *((char*)NULL) = 0xff; /* Force debug break */ abort(); }