unix: remove __read_mostly macro
It creates trouble with llvm-gcc on OS X.
This commit is contained in:
parent
f8e7513a06
commit
b7047d6701
@ -463,7 +463,7 @@ int uv__accept(int sockfd) {
|
||||
|
||||
while (1) {
|
||||
#if __linux__
|
||||
static __read_mostly int no_accept4;
|
||||
static int no_accept4;
|
||||
|
||||
if (no_accept4)
|
||||
goto skip;
|
||||
|
||||
@ -28,11 +28,8 @@
|
||||
#include <assert.h>
|
||||
#include <stdlib.h> /* abort */
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# define __read_mostly __attribute__((__section__(".data.read_mostly")))
|
||||
#else
|
||||
# define __attribute__(v)
|
||||
# define __read_mostly
|
||||
#if defined(__STRICT_ANSI__)
|
||||
# define inline __inline
|
||||
#endif
|
||||
|
||||
#undef HAVE_FUTIMES
|
||||
|
||||
@ -117,7 +117,7 @@ static void uv__chld(uv_signal_t* handle, int signum) {
|
||||
|
||||
int uv__make_socketpair(int fds[2], int flags) {
|
||||
#if __linux__
|
||||
static __read_mostly int no_cloexec;
|
||||
static int no_cloexec;
|
||||
|
||||
if (no_cloexec)
|
||||
goto skip;
|
||||
@ -153,7 +153,7 @@ skip:
|
||||
|
||||
int uv__make_pipe(int fds[2], int flags) {
|
||||
#if __linux__
|
||||
static __read_mostly int no_pipe2;
|
||||
static int no_pipe2;
|
||||
|
||||
if (no_pipe2)
|
||||
goto skip;
|
||||
|
||||
@ -440,7 +440,7 @@ static int uv__emfile_trick(uv_loop_t* loop, int accept_fd) {
|
||||
|
||||
|
||||
void uv__server_io(uv_loop_t* loop, uv__io_t* w, int events) {
|
||||
static __read_mostly int use_emfile_trick = -1;
|
||||
static int use_emfile_trick = -1;
|
||||
uv_stream_t* stream;
|
||||
int fd;
|
||||
int r;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user