mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-24 07:02:45 +00:00
fix a compile fail by strndup in RHEL5 env
When we compile btrfs-progs in RHEL5(with default gcc 4.1.2 and glibc-2.5-18), we can get following error: cc1: warnings being treated as errors btrfs-list.c: In function 'ino_resolve': btrfs-list.c:511: warning: implicit declaration of function 'strndup' btrfs-list.c:511: warning: incompatible implicit declaration of built-in function 'strndup' make: *** [btrfs-list.o] Error 1 ... cc1: warnings being treated as errors btrfs.c: In function 'split_command': btrfs.c:168: warning: implicit declaration of function 'strndup' btrfs.c:168: warning: incompatible implicit declaration of built-in function 'strndup' make: *** [btrfs-list.o] Error 1 We can add _GNU_SOURCE definition according man strndup. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
This commit is contained in:
parent
2d428975f2
commit
6c94ed2479
@ -16,6 +16,7 @@
|
||||
* Boston, MA 021110-1307, USA.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#ifndef __CHECKER__
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mount.h>
|
||||
|
Loading…
Reference in New Issue
Block a user