Pārlūkot izejas kodu

Add static declaration for OSX specific clock functions

bel2125 8 gadi atpakaļ
vecāks
revīzija
08ef373dba
1 mainītis faili ar 4 papildinājumiem un 8 dzēšanām
  1. 4 8
      src/civetweb.c

+ 4 - 8
src/civetweb.c

@@ -153,9 +153,7 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check");
 #include <assert.h>
 
 /* clock_gettime is not implemented on OSX prior to 10.12 */
-int _civet_clock_gettime(int clk_id, struct timespec *t);
-
-int
+static int
 _civet_clock_gettime(int clk_id, struct timespec *t)
 {
 	memset(t, 0, sizeof(*t));
@@ -200,11 +198,9 @@ _civet_clock_gettime(int clk_id, struct timespec *t)
 /* if clock_gettime is declared, then __CLOCK_AVAILABILITY will be defined */
 #ifdef __CLOCK_AVAILABILITY
 /* If we compiled with Mac OSX 10.12 or later, then clock_gettime will be
- * declared
- * but it may be NULL at runtime. So we need to check before using it. */
-int _civet_safe_clock_gettime(int clk_id, struct timespec *t);
-
-int
+ * declared but it may be NULL at runtime. So we need to check before using
+ * it. */
+static int
 _civet_safe_clock_gettime(int clk_id, struct timespec *t)
 {
 	if (clock_gettime) {