Project

General

Profile

Actions

Bug #3107

closed

error: unknown type name 'errno_t' (macOS 10.13.6)

Added by ryandesign 17 days ago. Updated 13 days ago.

Status:
Fixed
Priority:
Normal
Category:
build_autotools
Target version:
ASK QUESTIONS IN Forums:
No

Description

Building lighttpd 1.4.60 fails on macOS 10.13.6:

In file included from ck.c:26:
./ck.h:34:1: error: unknown type name 'errno_t'
errno_t ck_getenv_s (size_t * restrict len, char * restrict value, rsize_t maxsize, const char * restrict name);
^
./ck.h:38:1: error: unknown type name 'errno_t'
errno_t ck_memclear_s (void *s, rsize_t smax, rsize_t n);
^
./ck.h:42:15: error: unknown type name 'errno_t'
static inline errno_t ck_memzero(void *s, rsize_t n);
              ^
./ck.h:43:15: error: unknown type name 'errno_t'
static inline errno_t ck_memzero(void *s, rsize_t n) {
              ^
./ck.h:47:1: error: unknown type name 'errno_t'
errno_t ck_strerror_s (char *s, rsize_t maxsize, errno_t errnum);
^
./ck.h:47:50: error: unknown type name 'errno_t'
errno_t ck_strerror_s (char *s, rsize_t maxsize, errno_t errnum);
                                                 ^
6 errors generated.
make[3]: *** [ck.o] Error 1

Actions #1

Updated by gstrauss 17 days ago

This works on macOS 11.6 (on a MacBook Air from 2014). Any reason you haven't upgraded to macOS 11?
Sorry, I don't have access to a machine with macOS 10.

Please have a look in src/ck.h. Near the top is some logic for FreeBSD. Something similar might be needed for macOS 10.
Please try adding to src/ck.h:
#include <errno.h>

Actions #2

Updated by gstrauss 17 days ago

  • Subject changed from error: unknown type name 'errno_t' to error: unknown type name 'errno_t' (macOS 10.13.6)
Actions #3

Updated by gstrauss 13 days ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.xx to 1.4.61

It appears on macOS 10.11.6 that errno_t is defined if _DARWIN_C_SOURCE is defined (and <sys/types.h> is included), or if <errno.h> is included and __STDC_WANT_LIB_EXT1__ is defined to a value >= 1

Actions #4

Updated by gstrauss 13 days ago

  • Status changed from Patch Pending to Fixed
Actions

Also available in: Atom