Browse Source

[core] earlier macOS need define for errno_t (fixes #3107)

Earlier macOS need _DARWIN_C_SOURCE defined for errno_t from sys/types.h

Alternatively, define __STDC_WANT_LIB_EXT1__ >= 1 before include errno.h

x-ref:
  "error: unknown type name 'errno_t' (macOS 10.13.6)"
  https://redmine.lighttpd.net/issues/3107
master
Glenn Strauss 2 months ago
parent
commit
2a3cca7c56
  1. 5
      src/ck.h
  2. 6
      src/first.h

5
src/ck.h

@ -12,6 +12,11 @@
#ifndef __STDC_WANT_LIB_EXT1__ /*(enable C11 Annex K ext1 *_s functions)*/
#define __STDC_WANT_LIB_EXT1__ 1
#endif
#if defined(__APPLE__) && defined(__MACH__)
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE
#endif
#endif
#include "first.h"
#ifdef __FreeBSD__
#ifndef _RSIZE_T_DEFINED /* expecting __EXT1_VISIBLE 1 and _RSIZE_T_DEFINED */

6
src/first.h

@ -13,6 +13,12 @@
#define _DEFAULT_SOURCE
#endif
#if defined(__APPLE__) && defined(__MACH__)
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE
#endif
#endif
#ifndef __STDC_WANT_LIB_EXT1__
#define __STDC_WANT_LIB_EXT1__ 1
#endif

Loading…
Cancel
Save