diff --git a/ol-unix.c b/ol-unix.c index 40307f38..caf4861f 100644 --- a/ol-unix.c +++ b/ol-unix.c @@ -13,7 +13,8 @@ #include #include -#if !defined(HAVE_STRNLEN) /* Implement for platforms that lack strnlen */ + +#ifndef strnlen size_t strnlen (register const char* s, size_t maxlen) { register const char *e; size_t n; @@ -21,7 +22,7 @@ size_t strnlen (register const char* s, size_t maxlen) { for (e = s, n = 0; *e && n < maxlen; e++, n++); return n; } -#endif +#endif /* strnlen */ void ol_tcp_io(EV_P_ ev_io* watcher, int revents); diff --git a/ol.h b/ol.h index bbc9eaf6..60e2fd9e 100644 --- a/ol.h +++ b/ol.h @@ -25,11 +25,6 @@ typedef void (*ol_shutdown_cb)(ol_req* req); #endif -#if !defined(__APPLE__) /* FIXME: detect during configure */ -# define HAVE_STRNLEN -#endif - - typedef enum { OL_UNKNOWN_HANDLE = 0, OL_TCP,