Skip to content

Commit

Permalink
Merge pull request #1262 from ensc/bug/1261
Browse files Browse the repository at this point in the history
compat-cloexec: fix HAVE_DECL checks
  • Loading branch information
oetiker authored Aug 2, 2024
2 parents 019abc7 + 3bda163 commit 98b2944
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ RRDtool - master ...
====================
Bugfixes
--------
* Fix MacOS Build error (no SOCK_CLOEXEC on mac) @ensc fixes oetiker#1261

Features
--------
Expand Down
2 changes: 1 addition & 1 deletion src/compat-cloexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

inline static bool have_decl_o_cloexec(void)
{
#ifdef HAVE_DECL_O_CLOEXEC
#if defined(HAVE_DECL_O_CLOEXEC) && HAVE_DECL_O_CLOEXEC
return true;
#else
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/compat-cloexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

#include <rrd_config.h>

#ifndef HAVE_DECL_O_CLOEXEC
#if !defined(HAVE_DECL_O_CLOEXEC) || !HAVE_DECL_O_CLOEXEC
# define O_CLOEXEC 0
#endif

#ifndef HAVE_DECL_SOCK_CLOEXEC
#if !defined(HAVE_DECL_SOCK_CLOEXEC) || !HAVE_DECL_SOCK_CLOEXEC
# define SOCK_CLOEXEC 0
#endif

Expand Down

0 comments on commit 98b2944

Please sign in to comment.