浏览代码

memalign: include sys/param.h for MAX

libc/stdlib/malloc/memalign.c:22:1: warning: "MAX" redefined In file included from
./libpthread/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:25,
                 from ./include/bits/libc-lock.h:36,
                 from ./include/bits/stdio-lock.h:23,
                 from ./include/bits/uClibc_mutex.h:71,
                 from libc/stdlib/malloc/malloc.h:135,
                 from libc/stdlib/malloc/memalign.c:18:
./include/sys/param.h:75:1: warning: this is the location of the previous definition

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 13 年之前
父节点
当前提交
2f9445814c
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      libc/stdlib/malloc/memalign.c

+ 1 - 2
libc/stdlib/malloc/memalign.c

@@ -14,13 +14,12 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <sys/param.h> /* MAX */
 
 #include "malloc.h"
 #include "heap.h"
 
 
-#define MAX(x,y) ((x) > (y) ? (x) : (y))
-
 /*
       ______________________ TOTAL _________________________
      /                                                      \