Skip to content

Commit

Permalink
FIX: Use __linux__ instead of TARGET_OS_LINUX to check if the cur…
Browse files Browse the repository at this point in the history
…rent OS is Linux.
  • Loading branch information
uhm0311 authored and jhpark816 committed Aug 26, 2024
1 parent 98c2150 commit 500364b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libmemcached/connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static memcached_return_t connect_poll(memcached_server_st *server)
default: // A real error occurred and we need to completely bail
switch (get_socket_errno())
{
#ifdef TARGET_OS_LINUX
#ifdef __linux__
case ERESTART:
#endif
case EINTR:
Expand Down
8 changes: 4 additions & 4 deletions libmemcached/io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static bool repack_input_buffer(memcached_server_write_instance_st ptr)
#ifdef USE_EAGAIN
case EAGAIN:
#endif
#ifdef TARGET_OS_LINUX
#ifdef __linux__
case ERESTART:
#endif
break; // No IO is fine, we can just move on
Expand Down Expand Up @@ -266,7 +266,7 @@ static memcached_return_t io_wait(memcached_server_write_instance_st ptr,
WATCHPOINT_ERRNO(get_socket_errno());
switch (get_socket_errno())
{
#ifdef TARGET_OS_LINUX
#ifdef __linux__
case ERESTART:
#endif
case EINTR:
Expand Down Expand Up @@ -476,7 +476,7 @@ static memcached_return_t _io_fill(memcached_server_write_instance_st ptr)
#ifdef USE_EAGAIN
case EAGAIN:
#endif
#ifdef TARGET_OS_LINUX
#ifdef __linux__
case ERESTART:
#endif
if (memcached_success(io_wait(ptr, MEM_READ)))
Expand Down Expand Up @@ -603,7 +603,7 @@ memcached_return_t memcached_io_slurp(memcached_server_write_instance_st ptr)
#ifdef USE_EAGAIN
case EAGAIN:
#endif
#ifdef TARGET_OS_LINUX
#ifdef __linux__
case ERESTART:
#endif
if (memcached_success(io_wait(ptr, MEM_READ)))
Expand Down
2 changes: 1 addition & 1 deletion libmemcached/memcached.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
#include <libmemcached/version.h>
#include <libmemcached/sasl.h>
#ifdef LIBMEMCACHED_WITH_ZK_INTEGRATION
#ifdef TARGET_OS_LINUX
#ifdef __linux__
#include <linux/limits.h>
#endif
#ifndef PATH_MAX
Expand Down

0 comments on commit 500364b

Please sign in to comment.