소스 검색

Merge pull request #222 from fremouw/master

fixed os x build, added missing bracket.
bel2125 9 년 전
부모
커밋
ebb33f0cca
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -129,6 +129,7 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check");
 #include <mach/mach.h>
 #include <mach/mach_time.h>
 #include <assert.h>
+#include <string.h>
 
 /* clock_gettime is not implemented on OSX */
 int clock_gettime(int clk_id, struct timespec *t);
@@ -136,7 +137,7 @@ int clock_gettime(int clk_id, struct timespec *t);
 int
 clock_gettime(int clk_id, struct timespec *t)
 {
-    memset(t, 0, sizeof(*t);
+    memset(t, 0, sizeof(*t));
 	if (clk_id == CLOCK_REALTIME) {
 		struct timeval now;
 		int rv = gettimeofday(&now, NULL);
@@ -179,7 +180,6 @@ clock_gettime(int clk_id, struct timespec *t)
 #include <stdlib.h>
 #include <stdarg.h>
 #include <assert.h>
-#include <string.h>
 #include <ctype.h>
 #include <limits.h>
 #include <stddef.h>